Skip to content

Commit

Permalink
Merge pull request #83 from Tllew/bug/radios_in
Browse files Browse the repository at this point in the history
Radio initial values incorrectly set
  • Loading branch information
StuartMacKay authored Feb 14, 2024
2 parents 9f059ab + 56b30f7 commit 2fa5f7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crispy_forms_gds/templates/gds/layout/radio_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class="govuk-radios__input"
id="id_{{ field.html_name }}_{{ position }}"
value="{{ choice.0|unlocalize }}"
{% if choice.0 in field.value or choice.0|stringformat:"s" in field.value or choice.0|stringformat:"s" == field.value|stringformat:"s" %}
{% if choice.0|stringformat:"s" == field.value|stringformat:"s" %}
checked="checked"
{% endif %}
{% if choice.hint %}
Expand Down

0 comments on commit 2fa5f7b

Please sign in to comment.