The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
conditional scripted text dependant on field values on review page - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17) +--- Thread: conditional scripted text dependant on field values on review page (/showthread.php?tid=2431) |
conditional scripted text dependant on field values on review page - johnbleck2 - Apr 26th, 2013 Help! it's a newbie on a windows server. eek I know. I apologize in advance. I have set up an online form to use to write certain announcements using your tools (which so far are fabulous by the way). Is there a way using the API: on the review page - to use conditional statements on the form field values to create a scripted text to view or create a pop up window for the submitter to review how the entered data would be used to write the final script? Trouble is I'm new to php & all the html templates are looping through variables (which makes complete sense) but I'm struggling to capture the field values for the individual fields to work out the logic. any help here I would be so so greatful. ie: if I wanted to show the value of the subitters_phonenumber and the value of submitters_email form fields (from page 1) how do I show that those fields concantenated together on the review page? RE: conditional scripted text dependant on field values on review page - Joe - Apr 29th, 2013 Hi John, You could use Get Submission: http://docs.formtools.org/api/?page=ft_api_get_submission to retrieve the submission and then use Javascript to create a popup window to display the content. Hope this helps. Cheers, Joe RE: conditional scripted text dependant on field values on review page - johnbleck2 - Apr 29th, 2013 Exactly what I was looking for. Perfect and thank you so much! {{if $fields|@count > 0}} </table> {{/if}} {{/foreach}} {{$submission_info = ft_api_get_submission();}} {{$submission_info["submitter_firstname"];}} {{continue_block}} added the ft_api_get_submission() but I get nothing on the entire page. What am I doing wrong? Tried: {{$submission_info = ft_api_get_submission(3, 44);}} it's form id 3, field id 44 is a valid field id with data in it. Is it possible that since what I'm trying to do is on the "review" page that this function doesn't work until the submission is complete? |