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
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
It's almost done... (Multi-page Form Question)? - 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: It's almost done... (Multi-page Form Question)? (/showthread.php?tid=147)



It's almost done... (Multi-page Form Question)? - seawind - May 10th, 2009

I just completed a five page Multi-Page form with the api it took me a little while but formtools is working great, It sure made my life easier! My question is...

As an example the user fills out page one and two but then does not complete the process for any reason.

Can page one and two still be processed by formtools? Or would I have to setup every page to be submitted seperately for this to work?


Thanks ahead of time!


RE: It's almost done... (Multi-page Form Question)? - Ben - May 14th, 2009

Hi Seawind,

Sure! To do this, you should add pass the "finalize" => true key-value pair to the ft_api_process_form function on the first page of your form, rather than the last. As you probably know, once that information has been passed, Form Tools then displays the submission in the UI. Normally this goes on the last page of the form, but sometimes (like in your case!) it helps to set it earlier on.

Next, you'll need to pass one more key-value pair to that same function on pages 2-4:

PHP Code:
"may_update_finalized_submissions" => true

By default, the ft_api_process_form function won't allow you to update a finalized submission (just for safety's sake). This overrides that.

Hope this helps!

- Ben


RE: It's almost done... (Multi-page Form Question)? - seawind - May 14th, 2009

Ben,

Thank you very much for the information I will be trying that very soon and posting back with the results. While your on here I have one more question if you don't mind...

My very first form page is small to get the user started, this results in having a few duplicate fields on the second page such as First Name, Last Name, etc. Is there any way to pass the fields from the first page to populate the fields on the second page so they don't have to be reentered by the user?


Thanks,
Ryan


RE: It's almost done... (Multi-page Form Question)? - Ben - May 16th, 2009

Hey Ryan,

Sure, no problem. Check out this tutorial: http://docs.formtools.org/tutorials/api_refilling_form_fields/

It t outlines how to re-fill form fields if the user returns to previous pages, etc. It's pretty simple, actually: the ft_api_init_form_page() function that you're calling on all your pages returns a hash of form field values entered up to that point.

All the best -

Ben


RE: It's almost done... (Multi-page Form Question)? - seawind - May 16th, 2009

Ben,

Thanks I got the first bit of information you gave me working, now to to try this...

Great support!!


Ryan