Hi lukeboy,
Interesting! This is one use-case I hadn't thought of.
The reason this is happening is because of the "finalized" field for the submission. Quick explanation first, then I'll explain how to fix it for your case.
In most scenarios, people won't want to see incomplete submissions in Form Tools - they only want to see those that have been fully filled in. That's where the
finalized submission database field comes in. All new submissions via the API are set to
finalized = no. On the very LAST step of the form, you pass in a "finalize" => true parameter to the ft_api_process_form function. That does the job of marking the submission as complete (finalized = yes) and from that point onwards, it'll appear within Form Tools.
This is the standard way to do it - I think you're the first person to request it work another way!
In your case, what you need is for all submissions to be finalized on the very first step. This is no problem (I'll explain below) but there is a caveat: the ft_api_process_form() function automatically sends any emails out the moment a submission is finalized. Now that's a problem. Assuming your form has one or more email templates defined, you presumably want to continue sending them ONLY at step 2, correct? Otherwise emails will get submitted for incompletely filled out forms.
So yes, that's the problem. I've logged it as a bug, here:
http://bugs.formtools.org/index.php?cmd=view&id=217
But it should be pretty simple to fix. If you like, post me back and I'll release an update to the API this weekend to include a workaround.
In the meantime, if you DON'T have any email templates for your form, you can set all new submissions to be finalized very simply by passing the finalize key to the ft_api_process_form function on step 1 of your form, something like this:
PHP Code:
$params = array(
...
"finalize" => true
);
ft_api_process_form($params);
Sorry, long response! But I hope the info helps -
- Ben