Back

Drupal Forms User Guide

Save and return

If a form is particularly long and will require a lot of time and effort to fill in, you can enable Save and return functionality.

This will add an extra Save draft button to the navigation at the bottom of each page. When the user does this, they will receive an email with a special link containing a secure token. This link will allow them to return to their incomplete form and continue filling it in at a later time.

Create the form

Create the form as normal, ensuring that you capture a user's email address very early in the form, ideally on the first page.

Only webforms that are open to new submissions can be updated using a secure token. 

Configuring the settings

Click on the Settings section for the form and select the Submissions tab.

Submission access token settings

In the Submission access token settings section:

  • leave Allow users to view a submission using a secure token as off
  • toggle Allow users to update a submission using a secure token to on
  • leave Allow users to delete a submission using a secure token as off

Submission drafts settings

In this section, set Allow your users to save and finish the webform later to Authenticated and anonymous users.

This will reveal some more options. For these, you should:

  • leave Allow users to save multiple drafts as off, unless you want to allow multiple entries.
  • toggle Automatically save as draft when paging, previewing, and when there are validation errors to on.

You can leave the two textboxes for Draft saved message and Draft loaded message as the default messages, or add a more user-friendly messages.

Save these settings.

Create the email handler

The final step is to create an email handler to send a copy of the URL to the user's email address.

For this to work properly, you must have an email confirm element on the first page, which should be set to mandatory. Otherwise the handler won't know where to send the information.

Once that is in place, you can go to Emails / Handlers in the form's Settings page.

Click the Add handler button and select BBD draft email from the popup by clicking its Add handler button.

In the Send to section set the email to be the email confirm element on the first page.

Then scroll down to the Message section.

Change the Body setting to Custom body.

Then set your message and include the following token where you want the link to the form to be: 

[webform_submission:token-update-url] 

Only put the message and the link to the entry in the email body. Do not use any personalisation or personally identifiable data. To remove form values, go to Included email values/markup? and deselect all the fields.

Save the email handler and test.