Skip to content

Commit

Permalink
Render field as hidden when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehenry committed Jun 24, 2024
1 parent c18ad92 commit f8178f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dsfr/templates/dsfr/form_field_snippets/field_snippet.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{% load widget_tweaks %}
{% if field|widget_type == "checkboxinput" %}
{% if field.is_hidden %}
{{ field.as_hidden }}
{% elif field|widget_type == "checkboxinput" %}
{% include "dsfr/form_field_snippets/checkbox_snippet.html" %}
{% elif field|widget_type == "checkboxselectmultiple" %}
{% include "dsfr/form_field_snippets/checkboxselectmultiple_snippet.html" %}
Expand Down

0 comments on commit f8178f9

Please sign in to comment.