Adds a "Chosen" Selector with an enhanced UI and auto-suggest
This plugin adds 4 new form element types for you to choose in Participants Database when configuring your fields on the Manage Database Fields page.
- Chosen Dropdown – Single-select control with search and improved UI
- Chosen Multi Dropdown – Multiple-Select control with search and tag UI
- Chosen Dropdown/Other – Single Selector control with the ability to add a new item
- Chosen Multi Dropdown/Other – Multiple-Select control the allows new items to be added
How to Use the Plugin
Once the plugin is activated all you need to do is select one of the new form element types in your field definition. The user messaging and other UI features may be configured in the plugin settings, in the Participants Database admin menu cluster.
Populating the Dropdown from the Database
Here is a tutorial on how to populate the Chosen Dropdown with options from the database–or any other source: Pre-load a “Chosen” Dropdown with Options from the Database
Message shown in the control before a selection is made.
Message shown in a multi-select control before a selection is made.
No Results Message
Message shown when using the search field and no matching selections are found.
Add Other Value Text
When “other” values are allowed, the message that is shown if the user has typed in something that doesn’t match any of the selections, suggesting that they can save it.
Disable Search Threshold
The number of items needed in a dropdown in order for the search function to be active. This is to prevent the search control from appearing when there are only a few items to select from. Has no effect on “other” form elements because the search input is where the use may type in a new value.
How do I create groups of options?
This is done in the “values” field of the field definition. A group of options is called an “optgroup” and you can define optgroups with a title like this:
So for example, here is a list of options that have been divided into two groups:
Activity::optgroup, Sports::sports, Outdoors::outdoors, Yoga::yoga, Hobbies::optgroup, Photography::photography, Art/Crafts::crafts, Music::music, Cuisine::cuisine
That will display in the Chosen Dropdown like this:
Can the Chosen Dropdown have an "other" option?
Yes, it’s very simple to set up. In the field definition, choose “Chosen Dropdown/Other” or “Chosen Multi Dropdown/Other” depending if you want them to choose only one or let them choose several options. That gives the user the ability to type their option in and select it. It looks like this: