I thought that perhaps it was better/easier to break my question out as it may simply be confusion on my part and did not want to confuse the other thread as well.
So, I am trying to get multiple forms working on one page and am starting with trying to get the first two going. here is what I have for code on the forms page:
With this, I am getting a 200 error, which is saying that the second parameter I have is wrong ($pp["mode"]). I guess what I am confused about in this case is where the value of $pp["mode"] comes from. Do I have to set that to "initialize" or "live" somewhere else? Or, does it come from the API? Also, if the mode is not initialize, do I not still have to have finalize=>true in there as well?
Thanks for any help clearing this up.
Dave
So, I am trying to get multiple forms working on one page and am starting with trying to get the first two going. here is what I have for code on the forms page:
Code:
<?php
require_once("/web/home/support/docs/assets/scripts/formtools/global/api/api.php");
$fields_9 = ft_api_init_form_page(9, $pp["mode"], "form_tools_form_9");
$fields_10 = ft_api_init_form_page(10, $pp["mode"], "form_tools_form_10");
if(isset($_POST['v-docSubmit'])) {
if ($pp["mode"] == "initialize") {
$params = array(
"namespace" => "form_tools_form_9",
"submit_button" => "v-docSubmit",
"next_page" => "entry-thanks.php",
"form_data" => stripslashes_deep($_POST),
"finalize" => true
);
} else {
$params = array(
"namespace" => "form_tools_form_9",
"submit_button" => "v-docSubmit",
"next_page" => "entry-thanks.php",
"form_data" => stripslashes_deep($_POST),
);
}
ft_api_process_form($params);
} else if (isset($_POST['vd-Submit'])) {
if ($pp["mode"] == "initialize") {
$params = array(
"namespace" => "form_tools_form_10",
"submit_button" => "vd-Submit",
"next_page" => "entry-thanks.php",
"form_data" => stripslashes_deep($_POST),
"finalize" => true
);
} else {
$params = array(
"namespace" => "form_tools_form_10",
"submit_button" => "vd-Submit",
"next_page" => "entry-thanks.php",
"form_data" => stripslashes_deep($_POST),
);
}
ft_api_process_form($params);
}
?>
With this, I am getting a 200 error, which is saying that the second parameter I have is wrong ($pp["mode"]). I guess what I am confused about in this case is where the value of $pp["mode"] comes from. Do I have to set that to "initialize" or "live" somewhere else? Or, does it come from the API? Also, if the mode is not initialize, do I not still have to have finalize=>true in there as well?
Thanks for any help clearing this up.
Dave