Oct 17th, 2011, 9:36 PM
Hi Adam,
Ah! Is it an API form? If not, then I'm afraid you'll need to convert it to one. API forms create unique submission IDs for each visitor when they come to the form. It's stored in:
(assuming you haven't specified a custom namespace). So you'll need to pull that value out when constructing the information to send along with the form ID to Nochex.
Regarding that code you posted, I don't quite follow... you set $form_id and $submission ID vars, but reference totally different variables in the mail() line. So no, they wouldn't work.
The point of sending the form ID + submission ID to and from the callback is so that it (a) validates the transaction and (b) provides you with all the info you need to tell Form Tools to show the submission (i.e. to finalize it). Sessions won't necessarily be active when the listener is called, so this technique ensures it has all the data it needs.
Hope this is a bit clearer...! It's kind of technical, I must admit.
- Ben
Quote:I haven't finalized the form before sending the info to Nochex, so it doesn't yet have a submission ID...
Ah! Is it an API form? If not, then I'm afraid you'll need to convert it to one. API forms create unique submission IDs for each visitor when they come to the form. It's stored in:
Code:
$_SESSION["form_tools_form"]["form_tools_submission_id"];
(assuming you haven't specified a custom namespace). So you'll need to pull that value out when constructing the information to send along with the form ID to Nochex.
Regarding that code you posted, I don't quite follow... you set $form_id and $submission ID vars, but reference totally different variables in the mail() line. So no, they wouldn't work.
The point of sending the form ID + submission ID to and from the callback is so that it (a) validates the transaction and (b) provides you with all the info you need to tell Form Tools to show the submission (i.e. to finalize it). Sessions won't necessarily be active when the listener is called, so this technique ensures it has all the data it needs.
Hope this is a bit clearer...! It's kind of technical, I must admit.
- Ben