Jan 18th, 2012, 11:34 AM
Alrighty! Forum catch-up time...
Sorry about that. What I meant is that you need to do this:
You just need to add the new key-value pair of "namespace" and whatever string you're using for the form's namespace.
Sorry - no, just the API functions relating to the form processing (i.e. the ones I mentioned). Any other functions (even the API ones) won't need changing. Apologies, that was very imprecise of me.
Unfortunately not. The ft_api_clear_form_sessions completely empties out sessions, even those of a form currently being put through, so the only place it can go is on the final thankyou page.
- Ben
Quote:I don't understand PHP enough to know what you mean for the ft_api_process_form() function.
Sorry about that. What I meant is that you need to do this:
PHP Code:
$params = array(
"form_data" => $_POST,
"next_page" => "next.php",
...
"namespace" => "yournamespace",
...
);
ft_api_process_form();
You just need to add the new key-value pair of "namespace" and whatever string you're using for the form's namespace.
Quote:Also - you said: "Each form will need to pass the same unique namespace to every API function." Does that mean EVERY function on the page?
Sorry - no, just the API functions relating to the form processing (i.e. the ones I mentioned). Any other functions (even the API ones) won't need changing. Apologies, that was very imprecise of me.
Quote:Would it be possible to include a ft_api_clear_form_sessions(); on the actual form page itself? Perhaps above where the $fields = ft_api_init_form_page(); line is?
If so, we could clear ALL sessions on page load, before attempting to start a session.... and that would be much simpler than this namespacing thing.
Unfortunately not. The ft_api_clear_form_sessions completely empties out sessions, even those of a form currently being put through, so the only place it can go is on the final thankyou page.
- Ben