Hi Ben... I am having some weird issues with my form, like it is producing a 302 or 304 (I forget which now today...basically the one saying it's already been initialized) and it probably has to do with the way I left it above.
So now I'm going to just do it the correct way haha! Just one question about what you wrote out:
would this be how I get the namespace all set up for my example? :
And then on my "Thank you" and "Cancel" pages I would have either:
or
Would I need to do anything special to the Submit or IPN pages as well? Currently I'm simply overriding the form id, success url, cancel url and notify url parameters passed by the library since I'm using the same library file for each one.
So now I'm going to just do it the correct way haha! Just one question about what you wrote out:
would this be how I get the namespace all set up for my example? :
Code:
$fields_8 = ft_api_init_form_page(8, $pp["mode"], "form_tools_form_8");
$fields_9 = ft_api_init_form_page(9, $pp["mode"], "form_tools_form_9");
if (isset($_POST['form_9_submit'])) {
if ($pp["mode"] == "initialize") {
$params = array(
"namespace" => "form_tools_form_9"
"submit_button" => "send",
"next_page" => "/form-9-success",
"form_data" => stripslashes_deep($_POST),
"finalize" => true
);
} else {
$params = array(
"namespace" => "form_tools_form_9"
"submit_button" => "send",
"next_page" => "/form-9-submit",
"form_data" => stripslashes_deep($_POST),
);
}
ft_api_process_form($params);
} else if (isset($_POST['form_8_submit'])) {
if ($pp["mode"] == "initialize") {
$params = array(
"namespace" => "form_tools_form_8"
"submit_button" => "approve",
"next_page" => "/form-8-success",
"form_data" => stripslashes_deep($_POST),
"finalize" => true
);
} else {
$params = array(
"namespace" => "form_tools_form_8"
"submit_button" => "approve",
"next_page" => "/form-8-submit",
"form_data" => stripslashes_deep($_POST),
);
}
ft_api_process_form($params);
}
And then on my "Thank you" and "Cancel" pages I would have either:
Code:
ft_api_clear_form_sessions("form_tools_form_9");
or
Code:
ft_api_clear_form_sessions("form_tools_form_8");
Would I need to do anything special to the Submit or IPN pages as well? Currently I'm simply overriding the form id, success url, cancel url and notify url parameters passed by the library since I'm using the same library file for each one.