2. Editing the user form

This advice applies to England. See advice for See advice for Northern Ireland, See advice for Scotland, See advice for Wales

Watch the video about adding or editing sections to a user form on Loom.

Watch the video about adding or editing questions in a user form on Loom.

The user form is made up of sections. Sections help to structure the form so it’s easier for the user to progress through it. 

A section is a collection of questions. Even if it’s just one question, it must go within a section. You can’t add a question to the letter on its own.

When you’re making a new user form, you can:

  • add existing form sections - called ‘reusable content'

  • create new form sections

You can use a mix of both in your template letter. 

You can add or edit sections on the Template Letter v2 entry. There’s a field called ‘Form sections’.

Screenshot of the form sections field. It's empty and shows a button to add content. The hint text below the field says 'Form sections break up the page by headings when a user edits the template letter'. The field is outlined in red at the side, and an alert says 'Required'.

You can reorder sections by clicking and dragging them. Use the grey grab handle (6-dot icon) on the left. 

Screenshot of several form sections. One of the 6-dot grab handle icons is annotated with a blue rectangle. The sections are a mix of new and reusable content.

Add an existing form section

Some sections are already built in Contentful. You can add them to your letters and they have the questions already set up within them. They're called 'reusable content'.

For example, a resuable section called ‘Your details’ already has questions for the user to answer with their name, address, email address and phone number.

This is how it looks in Contentful, and how it looks for the user.

Reusable section 'Your details' in Contentful. It contains the questions 'your full name, your address, your email address, and your phone number'. Next to this is a screenshot of the section as viewed by a user on the live website.

If you want to use a reusable form section, click the ‘Add content’ dropdown menu and then ‘Add existing content’.

Screenshot of dropdown menu to add content to a form section. The option 'add existing content' is selected.

You’ll see a list of all existing form sections that you can use. You can either scroll down to find the one you need or search for the name of the entry.

Screenshot of adding an existing section. There's two sections visible by scrolling down, or a search bar at the top.

Reusable sections are labelled with the words ‘reusable - DON’T EDIT’.

Screenshot of a reusable section. It's labelled 'Your details - reusable DON'T EDIT.' It's marked as published in Contentful.

You can see a library of all reusable content.

Important

Don't edit reusable content

Reusable content is used in many letters. If you edit a reusable entry, all instances will change. 

Don't edit any fields or add, remove or change the order of questions in reusable sections. 

It’s better to create a totally new question or section and edit that instead.

In the rare situation you need to edit reusable content, check which letters use it first. 

Add a new form section

Click the ‘Add content’ dropdown menu and under the 'NEW CONTENT' section, click ‘Template letter - form section’.

Screenshot of the dropdown menu to add content to a form section. The option 'New content - template letter - form section' is selected.

Do not duplicate a reusable section - it won’t duplicate the questions within it. It’s safer to create a new section from scratch. 

Then you can add new questions and reusable questions to it. It’s ok to use a mix of both.

Fill in the fields for the section. Some fields are ‘required’ - this means you must fill them in.

Name

This is the entry name to make it easier to find in Contentful. The user won't see it. Include the cab-ID number to help you find it.

You should name your sections like this: [title of content] - cab-ID number

Screenshot of section name field. It's marked as required. A user has filled it in with 'Previous complaint - 54249'.

Title

This is the name of the section that the user will see.

Screenshot of section title field. It's marked as required. A user has filled it in with 'Previous complaint'.

Intro text

This is an optional field for information that's relevant to all questions in that section. It will appear between the name of the form section and the first question.

You can use:

  • normal text

  • bullet point lists

You don’t need to write intro text for every section.

Screenshot of how Intro text looks in Contentful and to a user on the live website. The intro text reads 'You can find your account details by checking bills, letters or emails from your energy supplier. If you have an online account you can also check that.'

You can also use intro text to help users skip sections.

Screenshot of the user form on the live website. The intro text reads 'If this is your first complaint, leave this blank'.

Questions

You can:

  • add existing form questions - reusable questions 

  • create new form questions

It’s ok to use a mix of both. 

Adding questions is covered in more detail in the next section of this guide.

Version information

Try to write the version information so it will make sense to someone who looks at it later without knowing the context.

Say that it's a new section. If the work is part of a project, include the project name.

Screenshot of version information field. It's marked as required.

Remove a section from the form

You can remove sections from the form. It doesn't matter if they are reusable sections or sections that you created.

Click the 3 dot menu then select 'Remove'.

Screenshot of removing a section from a template letter form. The section is labelled 'Your complaint - 55165'. The user has clicked the 3 dot menu and has selected 'Remove' on the dropdown menu.

If you're editing an existing template letter, the section you removed will still be embedded in the letter format. Remember that you'll need to edit the letter format too.

Add existing questions

There’s a library of reusable questions you can use. You should check what reusable content is available first

They have the words ‘reusable DON’T EDIT’ in the title.

Screenshot of a reusable section. It's labelled 'Your details - reusable DON'T EDIT.' It's marked as published in Contentful.

Check the placeholder text makes sense for your letter first. If it doesn’t, you should create a new question instead.

If you need different placeholder text

If you want to use a reusable question but need different placeholder text, you should create a new question. Don't edit the original question. 

Open the reusable question in a separate tab, then copy and paste the error and hint text across to your new question.

Click ‘Add content’ then choose ‘Add existing content’.

Screenshot of adding an existing question using the dropdown menu. The option 'Add existing content' is highlighted.

You can reorder questions within a section by dragging them. Use the grey grab handle icon on the left.

Don't reorder questions within a reusable section, because it will change the order on every letter that uses them.

Three questions within a section. The middle question is highlighted in blue to show the 6 dot menu or grab handle icon.

Add a new question

Click ‘Add content’ then under the section ‘NEW CONTENT' click 'Template letter - question’.

Screenshot of adding a new question using the dropdown menu. The option 'New content - template letter - question' is highlighted.

Fill in all the fields for the question. Some fields are ‘required’ - this means you must fill them in.

Name

This is the entry name to make it easier to find in Contentful. The user won't see it. Include the cab-ID number to help you find it.

You should name questions like this: ‘[title of content] - [cab-ID number]’.

Screenshot of question name field. It's marked as required. The user has written 'When did you first complain? - 54249'.

Label

This is the name of the question that the user sees. Use content patterns to help you write it.

Screenshot of question label field. It's marked as required. The user has written 'When did you complain?'.

Placeholder text

Placeholder text appears on the example version of the template letter, in place of where the user’s answer would normally be. It helps the user understand if the letter is useful for their situation before they decide to fill it in. For example, when a user reads the example for a letter about faulty goods, it includes placeholder text about a faulty sewing machine. 

If you need to include addresses and company names, use our list of placeholder text. If you need to invent a new company, make sure the name is not the same as any real-life company.

If you need to include a date, use the year 2022 or later.

Screenshot of question placeholder text field. The user has written placeholder text about receiving a bill.

If it's a radio button question

You should use one of the radio button responses in the placeholder text field.

If the question is required

You should always add placeholder text.

If the question is optional

It’s up to you if you add placeholder text. For example, you should leave it blank if it would make the example letter very long.

Hint text

Hint text is a short sentence or example that helps users with context, or gives suggestions about what they should include in their answer. 

Add additional information or specific examples to the hint text if it helps the user to know:

  • what format to put their answer in - for example, the date in the format 14 January 2022

  • where to find the information they need - for example, where to find their National Insurance number.

Where possible, the question label should be clear enough that a user can answer the question without hint text.

If you are giving an example of what to write, use single quotation marks.

End hint text with a full stop.

Screenshot of question hint text field. The user has written hint text to help the user input a date in the right format.

Select the type of question

This determines which type of field the user fills in. It also determines how the content appears on the letter. You can only choose one type.

Screenshot of type of question radio buttons. It's marked as required. The options are 'text, text area, address, sender's address, text - align right and radio buttons'.

Text

A one-line text field. Use for short answers of a few words like names, phone numbers, dates, and costs. 

Text area

A multi-line text field. Use for longer answers like descriptions and complaints. 

Address

A multi-line text field. On the letter, the text will always align to the left. It’s used in the reusable content for the recipient’s address.

Sender’s address

A multi-line text field. On the letter, the text will always align to the right. It’s used in the reusable content for the sender’s address. 

Text - align right

A one-line text field. On the letter, the text will always align to the right. It’s used in the reusable content for the sender’s information that appears under their address, like their phone number and email address.

Radio buttons

Several options appear as radio buttons on the form. Using radio buttons is covered in more detail in the next part of the guide.

Required?

Select whether the question is required or not. 

Screenshot of question 'Required?'. It's marked as required. There's two options to select, either yes or no.

If you select ‘yes’, the user must answer the question. If they don’t answer it, they can’t progress to preview their letter.

They will see an error message above the answer field for any questions that they need to fill in.

Screenshot of a question on the user form. There's red error text between the question label and the answer field. It reads 'Enter your energy supplier's name'.

They will also see an error summary at the top of the form. If there's more than one error, the error messages will show in a list.

Screenshot of error summary at the top of a user form. The error text says 'There is a problem. Enter your energy supplier's name.'

There's more detail about writing error messages in the next section.

If you select ‘no’, the user will see '(optional)' next to the question. If they don’t fill in an answer, they will still be able to progress.

Screenshot of a question on a user form. The question is marked 'optional'.

Error message

If the question is marked '(optional)', users won’t see an error message, so you don’t need to write one in Contentful.

If the question is required, you should write an error message.

Keep error messages clear and concise to help users fix their error. Use the same wording as the question as much as possible.

Start error messages with: 

  • ‘Select’ for radio button questions

  • ‘Enter’ for questions that need a text answer

Don’t use ‘Please’ or a full stop at the end.

Read more about error messages on the design system.

Screenshot of error message field. The user has written 'Enter your full name'.

Version information

Try to write the version information so it will make sense to someone who looks at it later without knowing the context. Say that it's a new question. If the work is part of a project, include the project name.

Screenshot of version information field. It's marked as required.

Removing questions from a section

If it's a reusable section, you shouldn't remove any questions. This is because it will remove that question from all the other letters that include the reusable section.

If it's a question you created, and it's not used in any other letters, you can safely remove it. Click the 3 dot menu then select 'Remove'.

Screenshot of removing a question from a template letter section. The question is labelled 'Describe the problem - 55165'. The user has clicked the 3 dot menu and has selected 'Remove' on the dropdown menu.

If you're editing an existing template letter, the questions you removed will still be embedded in the letter format. Remember that you'll need to edit the letter format too.

Using radio buttons

If you selected radio buttons as the question type, you can add radio buttons to the question. 

You can:

  • add existing radio buttons - reusable content

  • create new radio buttons

It’s ok to use a mix of both.

Users can answer these questions by selecting a radio button. They can only select one.

This is what it looks like in Contentful, and for the user on the live website.

Radio buttons in Contentful. The buttons read 'Electricity, gas, and dual fuel'. All of them are also labeled 'reusable - don't edit'. Screenshot of radio button question and how it looks for the user. The question asks which type of energy the user gets. They've selected 'gas and electricity'.

You can reorder the radio buttons by dragging them. Use the grey grab handle icon on the left. 

Don't reorder radio buttons within reusable questions - it will change the order on every letter that uses it.

Screenshot of reordering radio buttons. The 6 dot menu or grab handle icon is annotated with a blue rectangle.

Add an existing radio button

Click ‘Add content’ then choose ‘Add existing content'.

Screenshot of adding an existing option using the dropdown menu. The option 'Add existing content' is highlighted.

Add a new radio button

Click ‘Add content’ then under the section ‘NEW CONTENT' click 'Template letter - radio button.

Screenshot of adding a new radio button using the dropdown menu. The option 'New content - template letter - radio button' is highlighted.

Fill in the fields for the radio button.

Name

This is the entry title to make it easier to find in Contentful. The user won't see it.

You should name radio buttons like this: ‘[title of content] - [cab-ID number]’.

Screenshot of option name field. The user has written 'Letter - 54249'.

Radio button label

This is the label on the radio button that is displayed to the user. It should start with a capital letter unless each radio button is finishing the end of a sentence.

Screenshot of radio button label. The user has written 'Letter'.

Radio button response

This is the text that will appear in the letter.

It can be different from the radio button label. For example, if the response will be embedded in a sentence, you can write it in lowercase, or add extra words so it makes sense.

Screenshot of radio button response field. The user has written 'by letter' all in lower case.

You can change the words between the label and the response to make it clearer for the 2 users: the sender, and the recipient. You could choose to use different keywords or terms for each user group.

For example, this question asks the user which type of energy they get. We ask if they get ‘Gas and electricity’ on the radio button label.

Screenshot of question in the user form. It asks 'Which type of energy do you get?'. The user has selected 'Gas and electricity'.

In the letter format, we embed it inline next to the phrase ‘Type of supply’. This language is clearer for the recipient of the letter - the energy company.

Screenshot of letter format. The user has written 'Type of supply:' then embedded the question 'Which type of energy do you get?'.

Additionally, we change the radio button response from ‘Gas and electricity’ to ‘Dual fuel’ so it’s clearer for the energy company. 

Screenshot of radio button label and radio button response fields. The user has written 'Gas and electricity' in the label, and 'Dual fuel' in the response.

The final letter looks like this.

Screenshot of letter. The letter reads 'Type of supply: Dual fuel'.

If it’s a Yes / No question 

You might want to create a ‘Yes / No’ question where one of the radio buttons generates a response, but the other stays blank. There are reusable radio buttons for ‘Yes’ and ‘No’ already in Contentful. Their radio button responses are blank. You can add the relevant blank radio button to your question.

Screenshot of reusable radio buttons for yes and no.

If it’s an optional question with radio buttons

You should add the reusable radio button ‘Not applicable’ at the bottom of your radio buttons. The radio button response is blank, so it won’t add anything to the letter.

Screenshot of reusable radio button 'Not applicable'.

You should also include the hint text: ‘If you select an option by mistake, change it to 'Not applicable'.

This helps the user deselect a radio button without needing to reload the form.

Screenshot of question in the user form. It's marked as optional. The question asks 'How did you contact them about this problem?'. The hint text says 'If you select an option by mistake, change your selection to 'Not applicable'.' The radio buttons read 'Letter, email, phone, online form, text, not applicable.' The hint text and the 'not applicable' radio button are annotated with a blue rectangle.

Removing a radio button from a question

If it's a reusable question, you shouldn't remove any radio buttons. This is because it will remove that radio button from all the other letters that include the reusable question.

If it's not a reusable question, it's safe to remove any of the radio buttons. It doesn't matter if they're reusable radio buttons or radio buttons that you created.

Click the 3 dot menu then select 'Remove'.

Screenshot of removing a radio button from a template letter question. The radio button is labelled 'Letter - How did you contact them about this problem - reusable don't edit'. The user has clicked the 3 dot menu and has selected 'Remove' on the dropdown menu.

Editing the letter format

Once you've finished adding sections and questions, you can move on to the step of creating the letter format. You'll do this in the 'letter format' field on the template letter entry.

There’s a separate page that shows you how to do this - 3. Editing the letter format.

Help us improve our website

Take 3 minutes to tell us if you found what you needed on our website. Your feedback will help us give millions of people the information they need.