Creating multistep webforms

Last modified: October 22, 2008 - 17:50

With Webforms, it is possible to create forms that span more than one page. These forms are known as multistep, or multipage forms.

To create a multistep form, create the form elements you want to appear on your form. Then, add one or more elements of the pagebreak type. Set the weight for these elements so that they appear in between sections of elements that you want to be separated by page.

Here is a user selecting the pagebreak element type:
Choosing the pagebreak element

After adding pagebreak element, the page break will appears between two other form elements:
The pagebreak element in the element list

When viewing the form, this element is rendered as a "Next page >>" button:

All of the subsequent form elements will appear on the next step of the form, after the user clicks submits this step.

Note: Use caution when combining the pagebreak and file components. File components will not be submitted unless they are after the last pagebreak in the form.

 
 

Drupal is a registered trademark of Dries Buytaert.