question about modification to PDF Plugin
15 posts by 5 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: March 7, 2011 (RSS)
By Codee - October 22, 2010
How hard would it be, with the PDF Plugin, to have the following scenario operate:
1) Site visitor comes to a form page on the client website and fills in the form
2) When visitor clicks the Submit button, multiple tasks are performed:
2a) A PDF of the form is generated for the visitor in a new browser window, AND, 1 of the following occurs
2b1) An email is sent to the site owner, with a copy of the PDF attached
or,
2b2) the data from the form is imported into the clients site database with CMSB (which DOES have the membership plugin enabled as well)?
Thanks in advance!
Re: [equinox69] question about modification to PDF Plugin
By Jason - October 22, 2010
So you would want a PDF created which is just the form with all the values they just entered? You could do this by directing the pdf plugin to a page that just displays the form and all of the values. To do this you would have to pass all of the data the client entered to that page.
As for sending the pdf as an attachment, you would have to save that pdf as a file on your sever before sending it. Here is a tutorial on how you can send emails with attachments:
http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php
If you need us to set this up for you, please send an email to consulting@interactivetools.com
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] question about modification to PDF Plugin
By Chris - October 22, 2010
To answer your question: it wouldn't be very hard, but it would take a while to set up and test properly. :)
Chris
Re: [Jason] question about modification to PDF Plugin
By Codee - October 22, 2010
As for the part about sending the pdf file as an attachment, you mentioned "creating the pdf on the server" but doesn't that already occur with the PDF plugin? So, that part of the work would already be done...but would somehow need to be pulled into the email as an attachment instantly after the button is depressed.?
Re: [chris] question about modification to PDF Plugin
By Codee - October 22, 2010
Sometimes I'm not sure where the line is drawn on that...frankly I'm amazed at the level of support IT provides daily through this forum if people are willing to work on their own product (so, yet another KUDOS to your team on that!)
Re: [equinox69] question about modification to PDF Plugin
By Jason - October 25, 2010
For your first question, the issue would be that the form is being filled out on the client side, but the PDF is created on the server side. So the form would have to be submitted in order for the server to know what information was entered.
To answer your second question, the plugin does create the pdf on the server, and it would be this pdf that would be attached to the email, so you're right, the work of creating the pdf is contained within the plugin.
As Chris said, this would take some time to set up and test to ensure that it's working properly, so this is something that would go beyond the forum. If you'd like us to get you a quote on what this would cost to set up, please send an email to consulting@interactivetools.com
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] question about modification to PDF Plugin
By Toledoh - November 2, 2010
Did this end up being sorted out?
I've got a real estate site, that I'd like to include a "Send brochure" type button from the property details page. This button would be a form with an email field (mabe jazz it up with "your name, friends name etc" then submit. The PDF would be created via the PDF plugin and the "brochure" emailed to the entered email address.
Any ideas?
Tim (toledoh.com.au)
Re: [Toledoh] question about modification to PDF Plugin
By Jason - November 3, 2010
That's definitely something that we can do for you, just send off an email to consulting@interactivetools.com and we'll get you a quote.
Thanks
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Toledoh] question about modification to PDF Plugin
By Dave - November 3, 2010
And if you wanted to give the php code a try yourself there is a function at the bottom of /lib/common.php called sendMessage() that makes it easy to send emails with attachments. There's some examples on how to call the function in the code.
Hope that helps!
interactivetools.com
Re: [Dave] question about modification to PDF Plugin
By Toledoh - November 3, 2010
I understand that to get you guys to do it for me would be paid work - no problem at all
Tim (toledoh.com.au)