A Backbone-Forms editor that covers Chosen functionality.
Via bower
:
bower install backbone-forms-chosen
Via npm
:
npm install backbone-forms-chosen
Just replace Select
editor type with chosen
.
Add data-placeholder
to editorAttrs
.
schema: {
states: {
type: 'chosen',
title: 'States',
options: states,
editorAttrs: {
multiple: 'multiple',
'data-placeholder': 'Select countries...'
}
}
}
Add editorOptions
to schema.
schema: {
states: {
type: 'chosen',
title: 'States',
options: states,
editorOptions: {
no_results_text: 'Oops, nothing found!'
}
}
}