Skip to content

Commit

Permalink
Merge pull request #1 from mrenigma/master
Browse files Browse the repository at this point in the history
Added a fix to ensure an empty value is always submitted (like repeaters)
  • Loading branch information
graham73may authored Aug 14, 2017
2 parents a21e8e6 + cf8c4d1 commit b5b93b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion templates/bolt/editcontent/fields/_ajaxmultictselect.twig
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ sortable: field.sortable|default(false)
'name': key,
'field': field
} %}


{# This ensures that an empty value is always submitted #}
<input type="hidden" name="{{ buic_opt_select.name }}">

<div class="col-sm-9{{ option.sortable ? ' sortable-select2-container' }} js-ajax-multi-ct-select-container" data-field="{{ data_field|json_encode }}">
{{ buic_select(buic_opt_select) }}
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/ajax-multict-select-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}
},
placeholder : options.placeholder,
allowClear : options.allowClear,
allowClear : options.allowClear || true,
minimumResultsForSearch : options.minimumResultsForSearch,
width : options.width,
ajax : {
Expand Down

0 comments on commit b5b93b6

Please sign in to comment.