Skip to main content

Building and editing

Learn how to start building your first form.

Your form's name and URL
Starting pages
Previewing your pages
Adding pages
Moving pages
Editing pages
Deleting pages
Choosing the type of page
Choosing which question format to use
Presenting users with a long list of options
Asking users to submit a file
Making a question optional
Validating user answers
Formatting content with markdown

Your form's name and URL

When you create a new form, you need to give it a name.

This name is:

  • what your form will be listed as in the MoJ Forms editor
  • the title that will appear on your form to users
  • used in your form's URL - for example, a name of Apply for a dog licence will produce a form URL of

The title can contain lowercase and uppercase letters, hypens and apostrophes. No other special characters are allowed. The name cannot start with a number but you could write it out - for example, 'two' instead of '2'.

We are making some changes in this area and it is not currently possible to change your form's name in the editor. Contact us whenever you want to change the name.

Back to top

The starting pages

When you create a new form, you are taken to your form's 'pages flow' or flow view. This shows how all the pages link together and is where you will build and edit your form. Most actions, such as adding and deleting pages, editing pages and creating branching, are launched from the flow view.

You are given some default pages to help you structure your form:

  • start page
  • check answers page
  • confirmation page
A new form is created with a start page, check answers page and confirmation page.

The start page is your form's home page and cannot be deleted. To find out more about what should go on your start page, read the Design System guidance.

All your form's question pages should come after the start page and before the check answers page.

Check answers and confirmation pages

For your form to successfully submit the user data it collects, it must have a check answers page and a confirmation page. In addition:

  • a form can only have one check answers page and one confirmation page
  • a form cannot be published to Live without both these pages

Back to top

Previewing your form

The flow view includes a 'Preview' button in the top right-hand corner.

Previewing your form is a quick way to check how the form will look and work without needing to publish it. Most things in preview will behave identically to the final published form but there are a few limitations:

  • a form in preview mode will not save any information entered into it or send any emails
  • preview links cannot be shared and will work only for you

Back to top

Adding pages

You can add pages to your form using the connection menu (+) that sits on each arrow.

The connection menu allows you to insert a range of new pages between existing pages.

This menu enables you to select a new page from the range of available templates. See Choosing the type of page for details.

When you add a new page, you need to give it a name. This will be the page's URL slug so should be in lower case with no spaces or special characters. Separate words with hyphens. For example, in the following URL, the page name is 'your-details':

Some names are reserved for global pages and you won't be able to use them:

  • metrics
  • ping
  • health
  • accessibility
  • cookies
  • privacy
  • maintenance
  • reserved
  • dashboard
  • admin

It is not currently possible to change the name of a page once you have created it.

Back to top

Moving pages

To move a page:

  • hover over the page thumbnail to reveal the page menu (3 dots in a circle) and select 'move page'
  • in the modal that appears, select another page from the drop-down list - your page will be moved to directly after this selected page

You can move most pages in this way, including pages that have become unconnected. Branching points, check answers and confirmation pages can't be moved. In these cases, the move page option is not shown in the menu.

Undoing a page move

When you move a page, an undo button will appear alongside the preview button. Clicking this button will reverse the page move.

If you undo the page move, a redo button will appear allowing you to repeat the original page move.

If you perform any other action on your form, the button will disappear and you will no longer be able to undo or redo the page move.

Screengrab showing the MoJ Forms flow view. A button labelled Undo move page is visible alongside the Preview button.

Back to top

Editing pages

You can open a page to edit in 2 ways:

  • clicking directly on the page thumbnail
  • hovering over the page thumbnail to reveal the page menu (3 dots in a circle) and selecting 'edit page'

Most text on a page can be edited. Just click on the text you want to change and start typing.

Some fields are required, like the page title, and others are optional. If a text area says it is optional, you don't have to delete it. The default text that appears in square brackets will be hidden in preview mode and when published.

Most text areas are set to a specific format, such as headings and hints. Text in content areas can be formatted using markdown.

Some text areas cannot be edited at the moment, including the buttons.

Back to top

Deleting pages

You can delete a page from the form flow view by hovering over the page thumbnail to reveal the page menu (3 dots in a circle) and selecting 'delete page'. This cannot be undone.

If you want to remove a page from your form without deleting it, you can move it to the unconnected pages section using the 'change next page' option.

Back to top

Choosing the type of page

When adding pages, you can choose from the following templates:

  • Single question page - as the name suggests, this template allows one question per page. You can choose from several question types:
  • Multiple question page - this template allows you to add several question components to a single page. You can use any of the question types available on a single question page except autocomplete and file upload.
  • Check answers page - use this page to let users check the information they have provided. If your form requires users to submit any information, it will need a check answers page.
  • Confirmation page - use this page after a check answers page to let users know their data has been sent.
  • Content page - use this page to provide users with information without asking any questions, such as advice about the application process or the task they are trying to accomplish. You can format the content using markdown - a simple way of indicating things like headings, links and tables using text symbols.
  • Exit page - use this page as the final page of a flow that doesn't require the user to submit any information. For example, you could tell a user that they are not eligible to continue based on some qualifying questions. As with content pages, you can format the content using markdown. Inserting an exit page will break the flow to any following pages and move them to the unconnected pages section.

Back to top

Choosing which question format to use

You can use the following question types on single and multiple question pages:

  • text
  • textarea
  • email address
  • number
  • date
  • radio buttons
  • checkboxes

The autocomplete and file upload question type can be used only on a single question page.

Most MoJ Forms question types follow the GOV.UK Design system which includes useful tips on when and how to use each type.

We will be adding more question types and formatting options in future updates.

Back to top

Presenting users with a long list of options

The autocomplete question type allows you to specify a large range of options for the user to choose from, such as a list of courts or locations. It looks like a text field with a black triangle, indicating a dropdown. When the user clicks into it the list of options appears. The user can scroll through the list to select their answer or start typing to filter the options. The form will only accept answers from the options specified.

This short animation shows an autocomplete question being filled in. The question is

This format is best when there are a lot of options to choose from. Smaller numbers of options are better presented using radio buttons.

Formatting your autocomplete options

Your autocomplete options must be uploaded to MoJ Forms in a comma-separated values (CSV) file. This is a plain text format that many applications use for exporting data.

The easiest way to create your autocomplete options is with a spreadsheet such as Microsoft Excel or Google Sheets. List your options in a column with a heading of 'Text', like this:

London Gatwick
London Heathrow

You can also include a second column of information with a heading of 'Value'. For example, you might want to associate a code or number with each option. This won't be shown in the question but will be shown instead of the text in the PDF and CSV submitted at the end. (If you don't provide values, the PDF and CSV will contain the text.) For example:

Text Value
Glasgow GLA
London Gatwick LGW
London Heathrow LHR

When entering your options, ensure that:

  • you have either one or 2 columns of information
  • the headings are exactly as shown here
  • the options are ordered alphabetically
  • there are no blank cells

Remember to save your options as CSV when you are ready to upload them to your form. (If your application gives you a choice of CSV types, use the standard “Comma-separated Values (.csv)” option.) There is a maximum file size of 1Mb.

Uploading your autocomplete options

To upload your options, open your autocomplete page in edit mode. Click in the question title to show the component menu (...) and select 'Autocomplete options'.

Screenshot of an autocomplete question being edited in MoJ Forms. The component menu is open and the autocomplete options link is highlighted.

The page includes a blue warning message to indicate whether any options have been uploaded. After uploading, you won't be able to see your options on the page. You will need to save your changes and test them either in preview mode or after publishing to Test.

It's not currently possible to edit your options once they have been uploaded. To change the options, you will need to upload a new file.

Back to top

Asking users to submit a file

The file upload question type allows you to ask users to attach a file to their form. It supports the following file formats up to 7MB in size:

  • portable document format (.pdf)
  • comma-separated values (.csv)
  • images (.jpg, .jpeg, .png)
  • MS Excel (.xls, xlsx)
  • MS Word (.doc, .docx)
  • Open Office (.odt, .ods)
  • plain text (.txt)
  • rich text (.rtf)

The component allows users to upload only one file per page. To collect additional files, you will need to add extra file upload pages.

Back to top

Making a question optional

When a question is required, the form will check that the user has provided an answer before moving to the next page. If they haven't, it will show an error message and prompt the user to complete the question.

All questions are required by default but you can switch this setting off to make a question optional. This can be done with both single question pages and individual questions on multi-question pages.

To make a question optional, first click in the question title as if you are going to edit it. This highlights the component settings button (3 dots in a circle). Clicking on the button will open the menu.

The option to make a question optional is in the component settings menu.

Click on the 'Required' setting to open the options, where you can set it to either 'yes' (required) or 'no'.

MoJ Forms automatically adds '(optional)' onto the end of the title of any question that isn't required.

Back to top

Validating user answers

You can set validation criteria for a range of question types, allowing you to specify things like the length or limits of an answer. When validation is present, the form will check the user's answers before moving to the next page and show an appropriate error if required.

The full range of options available are shown in this table:

Table: validation options

Validation Available with What it does
Minimum answer length Text
Text area
Sets the minimum number of characters (or words with text area) that will be accepted
Maximum answer length Text
Text area
Sets the maximum number of characters (or words with text area) that will be accepted
Minimum answer value Number Sets the lowest number that will be accepted
Maximum answer value Number Sets the highest number that will be accepted
Earliest date Date Sets the earliest date that will be accepted
Latest date Date Sets the latest data that will be accepted

To set validation, click in the question title to highlight the component settings button (3 dots in a circle) and click to open the menu. Validation options are listed in the menu.

The settings for maximum answer length allow you to specify the highest number of characters or words that will be accepted.

Back to top

Formatting content with markdown

In most cases, you won't have to worry about formatting. The page templates include fields for headings, labels and hint text and all you have to do is add your own words.

Content areas allow you to use markdown to add your own formatting. These are on every content page and can be added to some other page templates as required.

Markdown is a way of adding formatting to plain text using basic symbols and patterns. With markdown, you can add headings, links, lists, tables and more. For example, to create a bulleted list, you start each item with an asterisk (*). Here is a selection of the most common markdown elements:

Table: markdown formatting

Formatting Markdown Example
Headings Put 2, 3 or 4 hashtags at the beginning of your header, depending on the level of heading you need. ## Level 2 heading
### Level 3 heading
#### Level 4 heading
Bold Put the words you want to make bold inside double asterisks. make **these words** bold
Italic Put the words you want in italics inside single asterisks. make *these words* italic
Bullets Put an asterisk (or a hyphen) at the start of each item in your list and leave blank lines at the beginning and end of the list. Bulleted lists look like this:
* list item 1
* list item 2
* list item 3
Numbering Put a number with a full stop and space at the start of each item and leave blank lines at the beginning and end of the list. Numbered lists look like this:
1. list item 1
2. list item 2
3. list item 3
Web links Put the link text in square brackets followed immediately by the link url in round brackets. [link to GOV.UK](
Email links Put 'less than' and 'greater than' signs around the email address. <>
Tables Use dividers (or 'pipes') to split your content into columns and start each row on a new line. Make sure each row has the same number of columns. Put hyphens in the second row to make the first row a header row. Leave blank lines at the beginning and end of the table. 2 columns:
| Header 1 | Header 2 |
| -------- | -------- |
| Cell | Cell |
| Cell | Cell |
3 columns:
| Header 1 | Header 2 | Header 3 |
| -------- | -------- | -------- |
| Cell | Cell | Cell |
| Cell | Cell | Cell |
Call to action Put $CTA on the lines before and after the text you want in the box $CTA
This markdown creates a tinted box. You can use it to highlight important links and information.

For the full range of markdown options available, see this markdown guide.

Back to top