diff --git a/CHANGELOG.md b/CHANGELOG.md index 654d83e..e8da95e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 1.2.5 - 2019-12-18 +### Fixed +- Fixed the default option not being set + ## 1.2.4 - 2019-10-27 ### Added - background pattern to show transparent color option diff --git a/src/templates/colourOption.twig b/src/templates/colourOption.twig index 04736b9..8ac0bf0 100644 --- a/src/templates/colourOption.twig +++ b/src/templates/colourOption.twig @@ -8,11 +8,6 @@ {% set colours = value.color | split(',') %} {% endif %} -{# Set the default value #} -{% if option.default %} - {% set defaultValue = value|json_encode %} -{% endif %} - \ No newline at end of file +"> diff --git a/src/templates/input.twig b/src/templates/input.twig index b5e9b72..e6fb37e 100644 --- a/src/templates/input.twig +++ b/src/templates/input.twig @@ -23,6 +23,11 @@ optionId: namespacedId ~ '-option-' ~ loop.index, option: option, } %} + + {# Set the default value #} + {% if option.default %} + {% set defaultValue = value|json_encode %} + {% endif %} {% endfor %}