ONSdigital / design-system

ONS Design System
https://service-manual.ons.gov.uk/design-system
MIT License
27 stars 17 forks source link

Pre-set value to be available in a textarea within a radio #3242

Open MagdalenaLarge opened 6 days ago

MagdalenaLarge commented 6 days ago

As a developer from ids hub team I want to have a pre-set value available in textarea within a radio for a multiple page form So that if I return to a previous page my inputs will be loaded from the session and displayed

Description

The pre-set value be available in a textarea within a radio, was added in Release 70.0.4. The ids hub team would like to use this for a multiple page form, so that if you return to a previous page your inputs will be loaded from the session and displayed.

The change the user would like is to add the line "value": radio.other.value to as line 133 in the file src/components/radios/_macro.njk , so that the text area elif text area part is

Acceptance Criteria

GIVEN sets the context for what must happen before the Story can begin. WHEN defines the event or act that triggers the scenario? THEN defines precisely what happens if the scenario is successful.

TBC

Visualisation/Input from UCD

n/a

Linked User stories/epics

Issue raised by the user on our discussion board - link to the request User referred to this updated in release 7.0.4 Link to the ticket #3128

Technical details

{% elif otherType == "textarea" %} {% from "components/textarea/_macro.njk" import onsTextarea %} {{ onsTextarea({ "id": radio.other.id, "name": radio.other.name, "label": { "id": radio.other.id + "-label", "text": radio.other.label.text, "classes": 'ons-u-fw-n', "description": radio.other.label.description }, "charCheckLimit": { "limit": radio.other.charCheckLimit.limit, "charCountSingular": radio.other.charCheckLimit.charCountSingular, "charCountPlural": radio.other.charCheckLimit.charCountPlural }, "value": radio.other.value }) }} {% endif %}

Testing needs to be added to confirm the extra parameter works.

MVP (optional)