Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomi77/backbone-forms-chosen
Backbone-Forms chosen editor
https://github.com/tomi77/backbone-forms-chosen
backbone-forms chosen
Last synced: 10 days ago
JSON representation
Backbone-Forms chosen editor
- Host: GitHub
- URL: https://github.com/tomi77/backbone-forms-chosen
- Owner: tomi77
- License: mit
- Created: 2017-06-14T18:58:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-31T09:00:04.000Z (almost 7 years ago)
- Last Synced: 2024-10-03T09:21:26.317Z (3 months ago)
- Topics: backbone-forms, chosen
- Language: CoffeeScript
- Homepage: https://tomi77.github.io/backbone-forms-chosen/
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Backbone-Forms Chosen editor
[![Code Climate](https://codeclimate.com/github/tomi77/backbone-forms-chosen/badges/gpa.svg)](https://codeclimate.com/github/tomi77/backbone-forms-chosen)
[![Build Status](https://travis-ci.org/tomi77/backbone-forms-chosen.svg?branch=master)](https://travis-ci.org/tomi77/backbone-forms-chosen)
[![Coverage Status](https://coveralls.io/repos/github/tomi77/backbone-forms-chosen/badge.svg?branch=master)](https://coveralls.io/github/tomi77/backbone-forms-chosen?branch=master)
[![Dependency Status](https://david-dm.org/tomi77/backbone-forms-chosen.png)](https://david-dm.org/tomi77/backbone-forms-chosen)
[![devDependencies Status](https://david-dm.org/tomi77/backbone-forms-chosen/dev-status.svg)](https://david-dm.org/tomi77/backbone-forms-chosen?type=dev)
[![peerDependencies Status](https://david-dm.org/tomi77/backbone-forms-chosen/peer-status.svg)](https://david-dm.org/tomi77/backbone-forms-chosen?type=peer)
![Downloads](https://img.shields.io/npm/dt/backbone-forms-chosen.svg)A [Backbone-Forms](https://github.com/powmedia/backbone-forms) editor that covers [Chosen](https://harvesthq.github.io/chosen/) functionality.
## Installation
Via ``bower``:
~~~bash
bower install backbone-forms-chosen
~~~Via ``npm``:
~~~bash
npm install backbone-forms-chosen
~~~## Usage
Just replace ``Select`` editor type with ``chosen``.
### Change placeholder
Add ``data-placeholder`` to ``editorAttrs``.
~~~js
schema: {
states: {
type: 'chosen',
title: 'States',
options: states,
editorAttrs: {
multiple: 'multiple',
'data-placeholder': 'Select countries...'
}
}
}
~~~### Add extra chosen editor options
Add ``editorOptions`` to schema.
~~~js
schema: {
states: {
type: 'chosen',
title: 'States',
options: states,
editorOptions: {
no_results_text: 'Oops, nothing found!'
}
}
}
~~~## Demo
https://tomi77.github.io/backbone-forms-chosen/