Back

Drupal Forms User Guide

Form structure

Elements and pages 

Elements include question fields and markup elements (like HTML and dividers). 

Pages are used to divide these up into logical steps, so that the user can: 

  • move on to thinking about a different question or topic
  • save what they’ve entered so far
  • avoid having to scroll if using a mobile device
  • see more easily where they've made errors 

Introduction page 

This should include: 

  • a brief description of what the form is for, so the user knows if it’s for them 

  • how long it should take to complete 

  • any documents or reference numbers the user will need to have ready 

For search engine purposes, if the form is public facing, this introduction page should be a content page on the website, with a call-to-action styled start button linking to the form. If the form is not intended to be public, the introduction page can be built as a page within the form itself using HTML elements. 

One 'thing' per page 

It’s not always practical to keep to one question per page, but aim to keep to a single topic or thought process. 

For example, if asking about a child's school attendance, it makes sense to ask for the last date they were absent, percentage absence for the year and a copy of their attendance record on the same page. 

Reordering elements

When in Build mode, you can move elements within and between pages by dragging the cross symbol.  

You can reorder pages in the same way. If there are a lot of pages, use the collapse all option at the top of the screen to hide the nested elements. 

When you move elements to a different place in the form, always click Save before doing anything else, or everything will revert to its original position next time the page loads.

If you want an element to appear on every page (for example the title), drag it to the very top, so it’s outside all the pages.  Similarly if you want footer text to appear on all pages, drag it to the very bottom.