Radios
When to use this component
Use the radios component when users can only select one option from a list.
When not to use this component
Do not use the radios component if users might need to select more than one option. In this case, you should use the checkboxes component instead.
How it works
Read the GOV.UK Design System guidance on radios (opens in a new tab) for information on ordering options, hint text, and accessibility considerations.
HTML examples
Copy the HTML into your web template. Replace schema-name with your CRM field schema name, keeping any suffixes like -hint. This is required for the CRM helper framework to validate and submit data.
Use the input field above each example to enter your schema name. This updates all instances in the code automatically, ensuring no mistakes that could impact validation or accessibility.
For single question pages
If presenting only one question on the page, designate the contents of the label as the page heading.
This practice ensures users of screen readers hear the contents only once.
You will need to include an empty {% title %} block in your web template to remove the default page header and avoid duplication.
For single question pages
<div class="govuk-form-group">
<fieldset class="govuk-fieldset">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
Where do you live?
</h1>
</legend>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name" name="schema-name" type="radio" value="england">
<label class="govuk-label govuk-radios__label" for="schema-name">
England
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-2" name="schema-name" type="radio" value="scotland">
<label class="govuk-label govuk-radios__label" for="schema-name-2">
Scotland
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-3" name="schema-name" type="radio" value="wales">
<label class="govuk-label govuk-radios__label" for="schema-name-3">
Wales
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-4" name="schema-name" type="radio" value="northern-ireland">
<label class="govuk-label govuk-radios__label" for="schema-name-4">
Northern Ireland
</label>
</div>
</div>
</fieldset>
</div>
{% extends 'DfE/Layouts/2ColumnWideLeft' %}
{% block title %}{% endblock %}
{% block main %}
{% unless user %}
<script>
window.location.href="{{ sitemarkers['DfE/Error/AccessDenied'].url }}"
</script>
{% endunless %}
<div class="govuk-form-group">
<fieldset class="govuk-fieldset">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
Where do you live?
</h1>
</legend>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name" name="schema-name" type="radio" value="england">
<label class="govuk-label govuk-radios__label" for="schema-name">
England
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-2" name="schema-name" type="radio" value="scotland">
<label class="govuk-label govuk-radios__label" for="schema-name-2">
Scotland
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-3" name="schema-name" type="radio" value="wales">
<label class="govuk-label govuk-radios__label" for="schema-name-3">
Wales
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-4" name="schema-name" type="radio" value="northern-ireland">
<label class="govuk-label govuk-radios__label" for="schema-name-4">
Northern Ireland
</label>
</div>
</div>
</fieldset>
</div>
{% endblock %}
For multiple question pages
If presenting more than one question on the page, do not set the contents of the <legend> as the page heading.
For multiple question pages
<div class="govuk-form-group">
<fieldset class="govuk-fieldset">
<legend class="govuk-fieldset__legend">
Where do you live?
</legend>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name" name="schema-name" type="radio" value="england">
<label class="govuk-label govuk-radios__label" for="schema-name">
England
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-2" name="schema-name" type="radio" value="scotland">
<label class="govuk-label govuk-radios__label" for="schema-name-2">
Scotland
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-3" name="schema-name" type="radio" value="wales">
<label class="govuk-label govuk-radios__label" for="schema-name-3">
Wales
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-4" name="schema-name" type="radio" value="northern-ireland">
<label class="govuk-label govuk-radios__label" for="schema-name-4">
Northern Ireland
</label>
</div>
</div>
</fieldset>
</div>
{% extends 'DfE/Layouts/2ColumnWideLeft' %}
{% block main %}
{% unless user %}
<script>
window.location.href="{{ sitemarkers['DfE/Error/AccessDenied'].url }}"
</script>
{% endunless %}
<div class="govuk-form-group">
<fieldset class="govuk-fieldset">
<legend class="govuk-fieldset__legend">
Where do you live?
</legend>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name" name="schema-name" type="radio" value="england">
<label class="govuk-label govuk-radios__label" for="schema-name">
England
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-2" name="schema-name" type="radio" value="scotland">
<label class="govuk-label govuk-radios__label" for="schema-name-2">
Scotland
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-3" name="schema-name" type="radio" value="wales">
<label class="govuk-label govuk-radios__label" for="schema-name-3">
Wales
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-4" name="schema-name" type="radio" value="northern-ireland">
<label class="govuk-label govuk-radios__label" for="schema-name-4">
Northern Ireland
</label>
</div>
</div>
</fieldset>
</div>
{% endblock %}
Using hint text
Use hint text to provide relevant assistance to the majority of users, such as clarifying how their information will be used or where to locate it. The hint text block is demonstrated in the example below.
Please ensure the following:
- Use the hint text block appropriately
- Place the hint block correctly within your HTML component
- Add the
aria-describedbyattribute where necessary, for accessiblity. For radios this is against thefieldset.
Avoid lengthy paragraphs and lists in hint text, as screen readers will read out the entire content, potentially frustrating users. Additionally, refrain from including links within hint text, as screen readers do not indicate that the text is a clickable link.
Radios with hint text
<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="schema-name-hint">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
How do you want to sign in?
</h1>
</legend>
<div id="schema-name-hint" class="govuk-hint">
You'll need an account to prove your identity
</div>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name" name="schema-name" type="radio" value="dfe-sign-in" aria-describedby="schema-name-item-hint">
<label class="govuk-label govuk-radios__label" for="schema-name">
Sign in with DfE Sign In
</label>
<div id="schema-name-item-hint" class="govuk-hint govuk-radios__hint">
You'll have a user ID if you've registered for DfE Sign In before
</div>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-2" name="schema-name" type="radio" value="govuk-one-login" aria-describedby="schema-name-2-item-hint">
<label class="govuk-label govuk-radios__label" for="schema-name-2">
Sign in with GOV.UK One Login
</label>
<div id="schema-name-2-item-hint" class="govuk-hint govuk-radios__hint">
If you don't have a GOV.UK One Login, you can create one
</div>
</div>
</div>
</fieldset>
</div>
{% extends 'DfE/Layouts/2ColumnWideLeft' %}
{% block title %}{% endblock %}
{% block main %}
{% unless user %}
<script>
window.location.href="{{ sitemarkers['DfE/Error/AccessDenied'].url }}"
</script>
{% endunless %}
<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="schema-name-hint">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
How do you want to sign in?
</h1>
</legend>
<div id="schema-name-hint" class="govuk-hint">
You'll need an account to prove your identity
</div>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name" name="schema-name" type="radio" value="dfe-sign-in" aria-describedby="schema-name-item-hint">
<label class="govuk-label govuk-radios__label" for="schema-name">
Sign in with DfE Sign In
</label>
<div id="schema-name-item-hint" class="govuk-hint govuk-radios__hint">
You'll have a user ID if you've registered for DfE Sign In before
</div>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-2" name="schema-name" type="radio" value="govuk-one-login" aria-describedby="schema-name-2-item-hint">
<label class="govuk-label govuk-radios__label" for="schema-name-2">
Sign in with GOV.UK One Login
</label>
<div id="schema-name-2-item-hint" class="govuk-hint govuk-radios__hint">
If you don't have a GOV.UK One Login, you can create one
</div>
</div>
</div>
</fieldset>
</div>
{% endblock %}
Inline radios
In some cases, you can choose to display radios 'inline' beside one another (horizontally). Only use inline radios when the question only has two options or both options are short.
On small screens such as mobile devices, the radios will still be 'stacked' on top of one another (vertically).
Inline radios
<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="schema-name-hint">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
Have you changed your name?
</h1>
</legend>
<div id="schema-name-hint" class="govuk-hint">
This includes changing your last name or spelling your name differently
</div>
<div class="govuk-radios govuk-radios--inline" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name" name="schema-name" type="radio" value="yes">
<label class="govuk-label govuk-radios__label" for="schema-name">
Yes
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-2" name="schema-name" type="radio" value="no">
<label class="govuk-label govuk-radios__label" for="schema-name-2">
No
</label>
</div>
</div>
</fieldset>
</div>
{% extends 'DfE/Layouts/2ColumnWideLeft' %}
{% block title %}{% endblock %}
{% block main %}
{% unless user %}
<script>
window.location.href="{{ sitemarkers['DfE/Error/AccessDenied'].url }}"
</script>
{% endunless %}
<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="schema-name-hint">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
Have you changed your name?
</h1>
</legend>
<div id="schema-name-hint" class="govuk-hint">
This includes changing your last name or spelling your name differently
</div>
<div class="govuk-radios govuk-radios--inline" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name" name="schema-name" type="radio" value="yes">
<label class="govuk-label govuk-radios__label" for="schema-name">
Yes
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-2" name="schema-name" type="radio" value="no">
<label class="govuk-label govuk-radios__label" for="schema-name-2">
No
</label>
</div>
</div>
</fieldset>
</div>
{% endblock %}
Conditionally revealing a related question
You can ask the user a related question when they select a particular radio option, so they only see the question when it's relevant to them.
This might make two related questions easier to answer by grouping them on the same page. For example, you could reveal a phone number input when the user selects the 'Contact me by phone' option.
If the related question is complicated or has more than one part, show it on the next page in the process instead.
Do not conditionally reveal questions to inline radios, such as 'yes' and 'no' options placed next to each other.
Conditionally reveal questions only - do not show or hide anything that is not a question.
Your schema names are likely to be different for your related questions. Using the above code example as reference, your 'Text message' option and related 'Mobile phone number' input are likely to have different schema names if you are submitting both values to fields in the CRM database. Be aware of this when replacing the 'schema-name' placeholder values.
Conditional radios
<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="schema-name-hint">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
How would you prefer to be contacted?
</h1>
</legend>
<div id="schema-name-hint" class="govuk-hint">
Select one option
</div>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name" name="schema-name" type="radio" value="email" data-aria-controls="conditional-schema-name">
<label class="govuk-label govuk-radios__label" for="schema-name">
Email
</label>
</div>
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-schema-name">
<div class="govuk-form-group">
<label class="govuk-label" for="contact-by-email">
Email address
</label>
<input class="govuk-input govuk-!-width-one-third" id="contact-by-email" name="contactByEmail" type="email" spellcheck="false" autocomplete="email">
</div>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-2" name="schema-name" type="radio" value="phone" data-aria-controls="conditional-schema-name-2">
<label class="govuk-label govuk-radios__label" for="schema-name-2">
Phone
</label>
</div>
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-schema-name-2">
<div class="govuk-form-group">
<label class="govuk-label" for="contact-by-phone">
Phone number
</label>
<input class="govuk-input govuk-!-width-one-third" id="contact-by-phone" name="contactByPhone" type="tel" autocomplete="tel">
</div>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-3" name="schema-name" type="radio" value="text" data-aria-controls="conditional-schema-name-3">
<label class="govuk-label govuk-radios__label" for="schema-name-3">
Text message
</label>
</div>
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-schema-name-3">
<div class="govuk-form-group">
<label class="govuk-label" for="contact-by-text">
Mobile phone number
</label>
<input class="govuk-input govuk-!-width-one-third" id="contact-by-text" name="contactByText" type="tel" autocomplete="tel">
</div>
</div>
</div>
</fieldset>
</div>
{% extends 'DfE/Layouts/2ColumnWideLeft' %}
{% block title %}{% endblock %}
{% block main %}
{% unless user %}
<script>
window.location.href="{{ sitemarkers['DfE/Error/AccessDenied'].url }}"
</script>
{% endunless %}
<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="schema-name-hint">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
How would you prefer to be contacted?
</h1>
</legend>
<div id="schema-name-hint" class="govuk-hint">
Select one option
</div>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name" name="schema-name" type="radio" value="email" data-aria-controls="conditional-schema-name">
<label class="govuk-label govuk-radios__label" for="schema-name">
Email
</label>
</div>
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-schema-name">
<div class="govuk-form-group">
<label class="govuk-label" for="contact-by-email">
Email address
</label>
<input class="govuk-input govuk-!-width-one-third" id="contact-by-email" name="contactByEmail" type="email" spellcheck="false" autocomplete="email">
</div>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-2" name="schema-name" type="radio" value="phone" data-aria-controls="conditional-schema-name-2">
<label class="govuk-label govuk-radios__label" for="schema-name-2">
Phone
</label>
</div>
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-schema-name-2">
<div class="govuk-form-group">
<label class="govuk-label" for="contact-by-phone">
Phone number
</label>
<input class="govuk-input govuk-!-width-one-third" id="contact-by-phone" name="contactByPhone" type="tel" autocomplete="tel">
</div>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="schema-name-3" name="schema-name" type="radio" value="text" data-aria-controls="conditional-schema-name-3">
<label class="govuk-label govuk-radios__label" for="schema-name-3">
Text message
</label>
</div>
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-schema-name-3">
<div class="govuk-form-group">
<label class="govuk-label" for="contact-by-text">
Mobile phone number
</label>
<input class="govuk-input govuk-!-width-one-third" id="contact-by-text" name="contactByText" type="tel" autocomplete="tel">
</div>
</div>
</div>
</fieldset>
</div>
{% endblock %}
Additional examples
Additional examples can be found on the GOV.UK Design System:
These examples will eventually be incorporated into this guidance, demonstrating how to use each of these additional examples with Power Pages. If you require assistance in the interim to adapt these additional examples for use with Power Pages and the CRM helper framework, please contact the Solutions Delivery Team.
Error messages
An error message is displayed next to the field and in the error summary when a validation error occurs. The CRM helper framework automatically handles error messages for specific error states.
If nothing is selected and the question is required
'Select [whatever it is]'. For example, 'Select how you want to be contacted'.
If you would like any additional advice or guidance with using these examples on Power Pages, please contact the Solutions Delivery Team.