backbone-forms-chosen

1.0.3 • Public • Published

Backbone-Forms Chosen editor

Code Climate Build Status Coverage Status Dependency Status devDependencies Status peerDependencies Status Downloads

A Backbone-Forms editor that covers Chosen functionality.

Installation

Via bower:

bower install backbone-forms-chosen

Via npm:

npm install backbone-forms-chosen

Usage

Just replace Select editor type with chosen.

Change placeholder

Add data-placeholder to editorAttrs.

schema: {
  states: {
    type: 'chosen',
    title: 'States',
    options: states,
    editorAttrs: {
      multiple: 'multiple',
      'data-placeholder': 'Select countries...'
    }
  }
}

Add extra chosen editor options

Add editorOptions to schema.

schema: {
  states: {
    type: 'chosen',
    title: 'States',
    options: states,
    editorOptions: {
      no_results_text: 'Oops, nothing found!'
    }
  }
}

Demo

https://tomi77.github.io/backbone-forms-chosen/

/backbone-forms-chosen/

    Package Sidebar

    Install

    npm i backbone-forms-chosen

    Weekly Downloads

    37

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • tomi77