Skip Navigation

[Gelöst] Where is a Multiselect Field?

This support ticket is created vor 3 Jahren, 11 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Artikel
#1878593

Tell us what you are trying to do?
Hey there i have a field with up to 50-80 options to select from. I need a toolset field where the user can select multiple options.
Maybe you can imagine that a multi checkbox field is not an eye candy with those big number of options.

So i need a multiselect dropdownfield.
I used select2 to to get this working with a toolset select field. And it works great on frontend.
But in the backend of course the selectfield is not a multiselect field.
So how can i set this up?

To wrap it up:
i need a multiselect dropdown field in frontend and backend because of a big number of options.
How can i achieve this with toolset?

thanks

#1878605

Hello, unfortunately there is no multiselect custom field type in Toolset, so implementing something like this would require extensive custom programming to manipulate some other field type that allows multiple selections, like a checkboxes group. You would have to use PHP to enqueue your own custom JavaScript and CSS in the post editor pages where the checkboxes group field(s) appear(s), and implement something like select2.js in those fields to transform the checkboxes into some type of multiselect dropdown display.

Other more straightforward options that don't require extensive programming:
- Use a taxonomy instead of a custom field. Taxonomies are more easily managed than custom fields in wp-admin using a "typeahead" interface in conjunction with checkboxes. Taxonomy-based post queries are faster than custom field-based post queries because of how the WordPress database is architected, too, so you'll have better performance in filtered Views.
- Use a post reference field instead, where each option exists as a post in some custom post type. Post reference fields use a typeahead feature too, making it easier to manage these references.
- Use a M2M post relationship instead, where each option exists as a post in some custom post type. When searching for related posts, you can use the typeahead feature.

#1880061

My issue is resolved now. Thank you!