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



Form Tools
Form not processing or proceeding with multi page form [solved] - 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: Form not processing or proceeding with multi page form [solved] (/showthread.php?tid=23541)



Form not processing or proceeding with multi page form [solved] - NeilW - Apr 14th, 2017

Hi,

I am attempting to create my first multi-page form using the API, but I am going crazy and getting nowhere. Sad

I have created other internal forms in form tools without issue as well as other forms in general, but am having real issues with the API.

I believe I am following the instructions exactly as outlined in the docs, plus trying a few other things that seem more logical after the initial tests did not work.

For example, this is what I currently have at the top of my first page (above the <!DOCTYPE HTML);

<?php
require_once("/home/mysite/public_html/ftools/global/api/api.php");
$fields = ft_api_init_form_page(5, "initialize");
$params = array(
"submit_button" => "Submit",
"next_page" => "mbh_competitive_index_1.php",
"form_data" => $_POST
);
ft_api_process_form($params);
?>

Now strictly speaking, the docs ONLY say to have;

$params = array(
"submit_button" => "submit_button_name_attribute",
"next_page" => "next_page.php",
"form_data" => $_POST
);

(I have no file upload fields)

- on your first page instructions. Which I tried out of fun, and that didn't work, so I wrapped it in <?php ?> and that didn't work either so I then extended it to what I have above - otherwise how does the first page even get the api.php code to process the form? But anyway, that is not working either.

Interestingly, when I tried to delete "$fields = ft_api_init_form_page(5, "initialize");" from the line above, I got a 300 error, so there is a connection trying to take place somewhere.

My form code line is; <form id="create-competitive-answers" action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST"> - pretty much as directed.

Plus my button code is; <input type="submit" class="button" name="Button1" value="Submit" />

On the first page of the form, I only have three hidden fields and one select and they are all properly coded.

When you complete the select field and hit the "Submit" button the page refreshes, but does not proceed to the next page - nor does the selection remain in the select field. Everything just reverts back to what what was initially there. I get no error message either.

I have tried just continuing on manually through all the other form pages but at no time does the script take me to the next page or the "Success!" page, and nothing is registered at Step 3, other than tell me that the line of PHP you will need is:

$fields = ft_api_init_form_page(5, "initialize"); - which I have included on all pages.

I have also tried putting the full URL into the "next_page" -> variable without success.

Sadly, there seems nothing in the docs or on this forum that seem to be able to help me further, so any assistance would be greatly appreciated.

Thanks kindly,
- Neil

OK, sorry, I think I just found it, with the problem being with my button name. :?