The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
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?