ft_api_clear_form_sessions
API
This function should always be called on the final "thankyou" page of your form. The two functions, ft_api_init_form_page and ft_api_process_form store various values in sessions (a built-in PHP temporary storage mechanism) while the user progresses through your form. This function clears them.
$fields = ft_api_init_form_page(X); // where X is your form ID
Why is this needed?
If the sessions aren't emptied, the user may not be able to put through a second form submission. The reason for this is that when they return to the form, the API functions may well load the old submission ID from the previous submission. Then, when it comes to updating the submission information, it will realize that the submission has already been finalized by the original form submission - and fail!
Usage
The function is generally called without any parameters. It has no return value.
<?php
ft_api_clear_form_sessions();
?>
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:
<?php
ft_api_clear_form_sessions("my_form");
?>