Product Support

Chosen Selector

Adds a "Chosen" Selector with an enhanced UI and auto-suggest

Product Setup

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

Product Settings

Selection Prompt

Message shown in the control before a selection is made.

Multi-Selection Prompt

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.

F.A.Q.

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:

Activities::optgroup

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:

null_select::None

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 just downloaded and installed the plugin. Isn’t there a shortcode to place on my search page? The register page seems to be working fine. I know I am missing something obvious, but can not figure it out/
    Thanks for your help.

    • Is this in relation to the Chosen Dropdown Participants Database Add-On? What are you trying to set up?

  • Hi Roland,

    I encounter an issue with this addon. When setting a custom value (other) and saving it in the database, the value is well stored and displayed on pdb_single but, when I go back to the same entry in the admin area, the field looks empty (i.e. it’s written “select some options” and not the value stored in the database).

    Do you know a way to fix this?

    Thanks for the great job,
    Marius

    • I just checked this and it’s working here. I checked both “Chosen Multi Dropdown Other” and “Chosen Dropdown Other” I’m guessing this is a javascript conflict in your admin section. If you open the browser javascript console, what do you see in there when you open a record for editing in the admin?

      • Hi Roland,

        Sorry for the late reply. I tried again and the problem is still the same. When the value is set up as a possible value in the “Manage Database fields”, everything working fine. However, when the value is a custom one, it doesn’t appear both on the admin section and on pdb_record. The field looks empty but the value is stored in the database (I checked both on phpmyadmin and on pdb_single).

        Note that if you have multiple values, only the ones that are not custom appear.

        As you recommended, I checked the browser console but I don’t see any error, both on Firefox and Chromium…

        Marius

        • Hi Marius,

          Maybe you’re doing something different from what I’m testing, but I don’t see the problem here. Make sure you’re using the latest version of the chosen add-on, should be version 1.5.3

          If you want to send me a link so I can see for myself, I’ll check it out.

  • I recently started looking into your program, and have implemented the chosen dropdown, however…. When selecting the chosen dropdown other and upon adding the record. It adds it to the DB so that i can see it under the admin view…, but when i go to edit the record on the edit participant admin page, or end user view, the custom values do not show. Is there a fix for this?

    • Thanks, I wasn’t aware this was broken. I’ll issue an update soon.

      • Thank you so much.. is there a RSS feed i can join to know when new releases are out?

        • I don’t run a feed, but new plugin updates will show up in your WordPress updates.

  • Plugin and addon are great!!

    I am having and issue wih the dropdown menú when displayed in an iPhone with safari. Menus are scrollable and there is no “other” option in which I can type anything.

    My form with the chosen dropdown addon looks great and the option to type and search results from the posible options is amazing but I would need this ability when inputing data from ios.

    Any ideas?

    Kind regards,

    Javier

    • Have you tired setting the field form element to “Chosen Dropdown/Other”? That will allow the user to add add a new item.

      • Hi Roland,

        Yes but in iphone the option of adding a new item is not available.

        • As far as I know this works. Have you tried typing something in?

        • Yes. There is no way of typing anything. Safari shows the menu as the typical iphone scrollable list with no chance to type.

        • Javier,

          Yes, I can confirm that adding an “other” value does not work in IOS. This is not going to be a quick fix, I am relying on another library to add that fnctionality, it’s not my own code, so it will take some research to find a way to make this work. I’m sorry.

        • Hi Roland,

          Thanks for your confirmation. I just updated the chosen dropdown version and suddenly the options I define don’t appear in the form field (It shows 0,1,2 instead of the defined words as options).

          It worked great before the update.

          Kind regards,

          Javier

        • Javier,

          I’m trying to duplicate the problem here. Can you post some of what you got for your defined values setting for the field that is showing numbers? Is the field a “Chosen Dropdown”?

          What is the context where you see the problem? In the admin ? Frontend?

        • Never mind…I found it. I’ve issued an update to fix the problem.

        • Thank you so much!

          I am now trying to use your plugin in the mobile version (twenty seventeem theme and with some app creation pluggins) and the form is always wider than the page when viewed in vertical position. I guess maybe I can find a solution in the templates but just to let you know.

          Thanks again

        • Yes, table layouts don’t work well on mobile devices, I’d suggest the responsive template.

        • Moreover, WordPress backend shows following error:

          Warning: in_array() expects parameter 2 to be array, string given in /homepages/41/d345092183/htdocs/we-go/wp-content/plugins/pdb-chosen-dropdown-element/pdbcdl/Chosen_Dropdown.php on line 170

  • Hi, thank you for the wonderful plugin. I am having trouble with realizing Chosen Dropdown Participants Database Add-On like the example picture above. In the pictures above, there are titles that are written in bold and below the titles there are sub-selectable options. Could you show me how I can do that? And I do not understand how I allow users to select ‘other’ and add their own options. I have seen other sections and tutorials but they did not help me find out. I would appreciate if you could help me with those ones. Thank you for the awesome support!!

  • Hi Roland,

    Do you have plans to make the chosen dropdown form element searchable? I’m running into a problem where I want to present my providers with a multiselect dropdown with an ‘other’ option (like chosen) and then allow my front-end users the ability to search for entries in that multiselect field. Right now I’m restricted to either using the built-in multiselect dropdown so that my front-end users have search, but then having to enter in additional options manually OR using the chosen dropdown for my providers and not allowing my front-end users to search that field.

    Any suggestions?

    • I’m not sure I fully understand your question, but I’ll offer some hints that might help. The chosen dropdown is just a way to store data, and so when it comes to the search end of things, your users are just going to be searching for matches within the data stored in that field. It doesn’t matter that is was a chosen dropdown that saved the data in the first place.

      What I don’t understand is you say that if the field has a chosen dropdown, the users are unable to search that field…they should be able to choose any field for search.

      I do have an add-on that offers a lot of flexibility in how you configure your search for front-end users, it’s possible this may give you the functionality you’re looking for.

      Combo Multisearch

      • Sorry for the confusion; I’m currently using Combo Multisearch. I’ve got a column in my database for the cities served by the service providers. I populated the column with a list of cities, but I want the service providers to be able to add to it. I also added that column to the list of Multi Search Fields in the Combo Multisearch settings so that my end users can filter results with it. When I set that column to ‘Multiselect Dropdown’ or ‘Chosen Multi Dropdown’ in the field manager it displays to my end users as a multiselect dropdown, which is what I want, but it doesn’t give my service providers the ability to add a new city if it’s not in the list. I need to give my providers an ‘other’ option so I don’t have to manually add new cities to the list.

        I tried setting the column to ‘Dropdown other’ to see how it displayed to my end users and it just shows a standard dropdown, which is what I’d expect. But when I set the column to ‘Chosen Multidropdown/Other’ then the end users just see the column title with no dropdown whatsoever. Is that what it’s supposed to do? I was hoping that this option would present my end users a multiselect dropdown instead.

        • Now I get it, you’re saying the Chosen Dropdown Other form element isn’t working for you. I will probably need to see it to help you with this. Set up your field to be a Chosen Multi Dropdown/Other and send me a link so I can get an idea why it’s not working for you. If you can’t do that, then I suggest you open your JS console and look for errors of any kind when trying to display that form element.

  • Hi Roland,

    what values should i add in the “Value” field (database field management), to make this addon to work?

    Tomasz Winiarski

    • The values are defined in the normal way for dropdown fields, multiselect fields, etc. You enter a comma-separated list of values, such as:

      Alaska,Washington,Oklahoma

      You can also define titles for the values…for instance:

      Alaska::AK,Washington::WA,Oklohoma::OK

      If the user chooses “Alaska”, “AK” will be saved in the database.

      General instructions for setting up fields is found here:

      Defining Participants Database Fields

  • Thank you for the quick reply, Roland. Based on some user feedback, I have been thinking about ways to improve searchability/UI and thought about a combination of selector dropdown and JQuery Chosen.

    I have come to realize, however, that this might not be ideal for my purposes. It would be simpler to remove the dropdown altogether and provide the ability for the user to enter a keyword that would be searched within multiple fields of the Participants DB. Is this something implementable in your Participants DB plugin?

    Thank you so much,

    /Lucas

  • It seems that this plugin is targeted at the WP backend. Is it possible to use jQuery Chosen with the search field located in [pdb_list search=true] pages?

    I have tried a couple of other WP plugins (e.g., SW Chosen) and, unless I am doing something stupid (which is possible), none of them seem to work.

    Thanks a lot for all the great work,

    /Lucas

    • Hi Lucas,

      The chosen dropdown typically gets used in the forms on the frontend: the signup form and the record edit form. Do you want to use it in the field selector dropdown in the list search form or do you have some other idea of how you want it to work?

      • I actually trying to use it in this method. chosen with combo multisearch list

        • Currently there is limited compatibility between these two plugins. I updated Combo Multisearch recently so that all the “chosen” fields generate a search dropdown in the Multisearch control. So at least now it’s possible to search on fields that have the “chosen” selector. What it doesn’t do yet is allow multiple selections, nor does the chosen controller appear. I plan to release these compatibility fixes soon.

Got a Support Question?

You have to agree to the comment policy.

Would you like to be notified of followup comments via e-mail? You can also subscribe without commenting.