sweh / ajja

JavaScript library for simple creation of forms and display of collections
MIT License
2 stars 0 forks source link

Searchable select fields via Chosen #29

Open sweh opened 8 years ago

sweh commented 8 years ago

Originally reported by: Florian Pilz (Bitbucket: florianpilz, GitHub: florianpilz)


The JS library https://harvesthq.github.io/chosen provides really good looking select widgets that can search through available options. It also fits in nicely with Bootstrap. The question is whether we want to incorporate another JS library into the core of gocept.jsform and provide this "superior" select as default. Or if we want to stay bare bones and keep the usual HTML select widget.

Integration is really easy, just call $('#field-to_recipient select').chosen({width: '100%'}); on a select template.


florianpilz commented 8 years ago

We should not include it by default to keep dependencies low. But maybe we should provide template / integration code, so the developer only has to install chosen to make it work. Besides we should consider using select2 instead, since chosen is in maintenance mode and is less useful for mobile / responsive.