The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Problems showing form values on thanks page - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Problems showing form values on thanks page (/showthread.php?tid=765) |
Problems showing form values on thanks page - shala - Jun 28th, 2010 First of all, thanks Ben for this excellent tool. Everything is going great, except for one last detail: we'd like the "thank you" page to display the form values so the user can print them. However, I can't get the values to show up. I've followed the tutorial and looked into past threads about the issue, but I still only get a blank space on my thank you page where the php coding is. It doesn't show any errors and the form otherwise submits as it should. I've noticed that up in the URL, a submission id is displayed but not a unique key (it's just blank after &unique_key=) I'm new to Form Tools and PHP so I'm probably just missing something obvious somewhere! I appreciate any help, thanks. At the top of the form page: PHP Code: <?php At the top of the thanks page: PHP Code: <?php In the thanks page: PHP Code: <?php RE: Problems showing form values on thanks page - JanEllen - Jan 26th, 2011 This is the exact same scenario that I am trying to accomplish as well. I would like for our Thank You page to display the contents of the form all filled out so that the user can print it out, because there is a signature line at the bottom where they need to sign and date and mail back to us. Any clues on how to go about this. I know only a tiny bit of PHP (I am basically a graphic designer - trying to be a programmer...lol...) but am willing to learn what I need to pull this off... If anyone out there can help, I would be OH so appreciative! Our form is quite lengthy (I didn't put it into multiple pages because that just seemed too complicated for me...lol) but I REALLY need to "re-display" the completed form in its entirety so the user may print it out. OR, alternatively, maybe export to a PDF? (if there's a way to do that? if not, no biggie...) Thanks in advance! RE: Problems showing form values on thanks page - TechOnPurpose - Jan 28th, 2011 Hi, I'm new to Form Tools, but I think I can answer this question. The problem is that you are following the suggested placement of the session and field reset code. At the top of the thank you page, only put the code: PHP Code: <?php Then at the very bottom of your thank you page, put: PHP Code: <?php What is happening is that you are clearing the session info and post fields before you display them. I hope this works for you. I haven't tried it, but it seems to be the logical reason for your failure to be able to print the data. RE: Problems showing form values on thanks page - JanEllen - Jan 28th, 2011 Thanks, I ended up just ditching the API method and using the Direct one. I was able to make it work. I am not sure that would have worked, maybe? It never was even getting to the Thank You page... it stayed on the application form page and just showed a blank white page. Anyway, I decided that we could get away with using the Direct method for now, in the interest of getting this thing working. ;-) Oh, and I also decided to have it just email the user instead of them printing the screen results since I could not figure that part out. ;-) RE: Problems showing form values on thanks page - robert - Feb 2nd, 2011 Hi, I'm new to this forum but think I can help with a solution. First of all create a Connections folder with following php file (dbf.php) in it PHP Code: <?php Let your 'thanks' page start with following PHP code (replace 'dbf' on filename and code with any name of your choice) PHP Code: <?php require_once('Connections/dbf.php'); ?> The $cfieldname variables are those you wish to show wherever on your thanks page. For example if you wish to show a submitted Name and E-mail address: PHP Code: <table width="100%" border="0" cellspacing="0" cellpadding="0"> Hope this helps. It works fine on my thanks pages. Cheers, Robert RE: Problems showing form values on thanks page - Hannes - Feb 5th, 2011 Hi Robert, one solution can also be to use http_get_vars... on the last page of the form you modify the parameter "next_page"... PHP Code: "next_page" => "submit.php?variable=".$fields['myfield'], PHP Code: <?php Cheers, Hannes RE: Problems showing form values on thanks page - JMW - Apr 13th, 2011 Hi, I'm relatively new to form tools. But I have been using the "registration" demo form as a guide in creating my own form. The third page of the demo is a review page that displays all the form content entered and provides the option to print it out. Could that be the answer your looking for? |