FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
namespace: if used, how to clear session (and remove uncompleted sessions)
#1
Hi,

I am using namespace in my external form, processed with the API.

When I reach the last page I get a 306 error. I suppose I should edit the values of the last lines in the code according to the ft_api_init_form_page values:

Code:
require_once("/home/tandform/public_html/formtools/global/api/api.php");
//$fields = ft_api_init_form_page();
$fields = ft_api_init_form_page("", "live", "tandform");
$params = array(
  "no_sessions_url" => "index.php"
    );
ft_api_process_form($params);
ft_api_clear_form_sessions();
ft_api_delete_unfinalized_submissions(1, true);

Should I add something to the clear_form ?
To what do I change the delete_unfinalized_submissions?
For those with the same issue: I found one answer already:

Quote:If you originally passed a custom sessions namespace string to the ft_api_init_form_page function, you need to pass the same namespace string to this function. For example, if your namespace was "my_form", you'd call this function like so:

Code:
ft_api_clear_form_sessions("my_form");
Reply
#2
Argh, graveyard shift bonehead mistake

of course the process form shouldn't be there the last page :/

correct code in my case is:

Code:
require_once("/home/tandform/public_html/formtools/global/api/api.php");
$fields = ft_api_init_form_page("", "live", "tandform");
ft_api_clear_form_sessions("tandform");
ft_api_delete_unfinalized_submissions(1, false);

I still am trying to figure out why the no_sessions_url parameter is not working with php form validation :/
http://forums.formtools.org/showthread.p...n=lastpost

Does anyone know what do to with that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)