Can we commit multi-page form data to the database with each click of the "next" button as opposed to a single database commit at the end of the form when it is submitted?

Our not-for-profit business system depends heavily on the wonderful webform module. We are trying to collect all information provided even if a user abandons the form halfway through.

So, rather than wait till page#4 and the data is committed to the DB when the submit button is hit, we need to commit each time the "next" button is clicked.

I looked into this but found the SID is blank in $form_state['values']['details']['sid'] until final submission - a game stopper :-)

Really would appreciate your help and advise on this issue.

Comments

sunshinee’s picture

In Form Settings>Advanced Settings, you check the box to enable "automatically save draft between pages." This won't send any emails, but will capture the data you're looking for. You could probably augment this behavior by using cron to email the drafts, if needed.

Hope this helps!
Joy

sisko’s picture

Thank you! Just what I discovered and needed.

quicksketch’s picture

Category: Feature request » Support request
Priority: Critical » Normal
Issue summary: View changes
Status: Active » Fixed

Thanks @sunshinee!

Note that save as draft doesn't work for anonymous users yet. There's an inprogress patch at #1932560: “Save draft” form button for anonymous users.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.