Injecting content
Sometimes a label, legend and hint don’t give enough of an explanation as to why a question is being asked or what the consequences of answering it might be. In these cases, the form builder supports the injection of HTML into most helpers. This content is inserted after the hint and before the form control.
Injected content is automatically associated with the element via its
aria-describedby
attribute allowing assistive technologies to
provide the user with a full explanation of what is required.
The following helpers support content injection:
#govuk_collection_check_boxes
#govuk_collection_radio_buttons
#govuk_collection_select
#govuk_date_field
#govuk_email_field
#govuk_error_summary
#govuk_file_field
#govuk_number_field
#govuk_password_field
#govuk_phone_field
#govuk_text_area
#govuk_text_field
#govuk_url_field
A radio button collection with a custom warning
All content supplied via a block is considered supplementary to the label and hint.