Skip to content

Commit

Permalink
Validation fix
Browse files Browse the repository at this point in the history
- Default position wasn't being set in the field which caused validation to fail
  • Loading branch information
Rias committed Jan 29, 2018
1 parent fbdf3e8 commit 83f660a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.9 - 2018-01-29
### Fixed
- Default position wasn't being set in the field which caused validation to fail

## 1.0.8 - 2018-01-28
### Fixed
- Fixed an issue where the default position couldn't be set in a Matrix field
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "rias/craft-position-fieldtype",
"description": "Brings back the Position fieldtype from Craft 2",
"type": "craft-plugin",
"version": "1.0.8",
"version": "1.0.9",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion src/templates/_components/fields/Position_input.twig
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
{% endfor %}
</div>

<input type="hidden" name="{{ name }}" value="{{ value }}">
<input type="hidden" name="{{ name }}" value="{{ value ?? field.default }}">

0 comments on commit 83f660a

Please sign in to comment.