Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:getgrav/grav-plugin-form into de…
Browse files Browse the repository at this point in the history
…velop
  • Loading branch information
rhukster committed Feb 16, 2021
2 parents b315f2e + a381adf commit b56bac8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/forms/default/data.txt.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{%- if show_field %}
{%- set value = form.value(scope ~ (field.name ?? index)) -%}
{%- if value -%}
{{- field.label|t|e }}: {{ string(value is iterable ? value|json_encode : value|e) ~ "\r\n" }}
{{- field.label|t|e }}: {{ string(value is iterable ? value|json_encode : value|escape('yaml')) ~ "\r\n" }}
{%- endif -%}
{%- endif %}
{%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/fields/hidden/hidden.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
{% endif %}
{% set input_value = value is iterable ? value|join(',') : value|string %}

<input data-grav-field="hidden" data-grav-disabled="false" type="hidden" class="input" name="{{ (scope ~ field.name)|fieldName }}" value="{{ input_value|e('html_attr') }}" />
<input data-grav-field="hidden" data-grav-disabled="false" {% if field.id is defined %}id="{{ field.id|e }}" {% endif %}type="hidden" class="input" name="{{ (scope ~ field.name)|fieldName }}" value="{{ input_value|e('html_attr') }}" />
{% endblock %}

0 comments on commit b56bac8

Please sign in to comment.