Skip to content

Commit

Permalink
Added support for custom Toggle id
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Apr 23, 2021
1 parent e70f34d commit 4a9a560
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
1. [](#improved)
* Better message for invalid nonce [#513](https://github.com/getgrav/grav-plugin-form/issues/513)
* Better error if `Form::getPage()` gets called too early [#518](https://github.com/getgrav/grav-plugin-form/issues/518)

* Added support for custom Toggle id

# v5.0.1
## 03/17/2021

Expand Down
2 changes: 1 addition & 1 deletion templates/forms/fields/toggle/toggle.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

{% for key, text in field.options %}
{% set key = key|string %}
{% set id = "toggle_" ~ field.name ~ key %}
{% set id = (field.id ?? ("toggle_" ~ field.name)) ~ key %}
{% set translation = text|t|trim %}

<input type="radio"
Expand Down

0 comments on commit 4a9a560

Please sign in to comment.