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:
When using a multiselect, I can't remove the last item, it keeps coming back.
With the Chosen Multiselect Dropdown, you must define a “none” option in order to be able to clear the value. You only need to do this is you need to give your users a way to clear out all the values in a multiselect.
We do this by adding a “null_select” to the list of options, like in this example:
That will provide a “None” option that saves an empty value, in other words, if the user selects only “None” in the selector, any value that was stored for the field will be blanked out. This is of course not true if they choose other selections along with the “None.”
The word “None” can be anything you want. The “null_select” part tells the plugin that the field is meant to have a blank value.
Support Discussions for Chosen Selector
I found the missing piece. In the “Participants Database Email Expansion Kit” template, you have to assign the proper field for connection. After that was done, we’re all good!
Glad to hear you got it working!
Yessir. I see that. I’m using your very cool “Participants Database Email Expansion Kit” and I just can’t figure out which options to use for the database fields. I believe the values are set in the expansion kit but I’m not sure for the field if the recipient’s email or name, etc…
emailaddress1,emailaddress2 (is that all I need in the “options” field in the field?) The documentation isn’t getting me there :)
No, you’re there, that’s all there is to it. You would use the value of the selector in the template’s “to” field. If the selector field is named “recipient” you place [recipient] in the “to” field of the template.
I’m using “name1” for Recipient Name in the Participants Database Email Expansion Kit and “firstname.lastname@example.org” as the Recipient Email
I’m using “name2” for Recipient Name in the Participants Database Email Expansion Kit and “email@example.com” as the Recipient Email
Then, in my signup form dropdown form that I added, I have name1, name2 for options and it’s not sending email to either, only the admin is receiving emails.
Hi Roland. I hope this is the right part of the forum for this question.
Previously, I had a dropdown created in one of my field groups that allowed the user to select which person should receive the signup form. It showed two people and depending upon who they selected, would trigger an email to that person. For internal reasons a few months ago, I was asked to remove it. Now they want it back. I can’t recall how to create that field in the field group. Can you point me in the right direction?
The normal way to do this is to use a selector of some kind, with the recipient’s email addresses as the values. You can use value titles for a visible name if you don’t want the email address shown. Then use the value of the selector in the “to” field of the email template.
This will not work using a multi-select field, it has to be a single selection field.
Thanks Roland! Could you spit out an example of what the option and values might look like? I don’t mind showing the email addresses because it’s only visible for internal usage.
That is in the documentation here: Field Options