Hi there, we'd like to display a custom taxonomy as a dropdown instead of the usual checkboxes when someone is writing a post. Is there a way to do this?
we'd like to display a custom taxonomy as a dropdown instead of the usual checkboxes when someone is writing a post. Is there a way to do this?
Maybe...it depends on whether you are talking about the wp-admin post editor, or the Forms post editor. It also depends on whether the taxonomy is flat like tags, or hierarchical like categories. I assume you mean hierarchical because you mentioned checkboxes, and flat taxonomies typically do not include checkboxes.
Forms / Hierarchical:
You can display either a single-select field, a multiple-select field, or a group of checkboxes. You also have the ability to allow or disallow the creation of new terms. The drag-and-drop Form builder shows these options in the main taxonomy field options (see drag-and-drop.png). The expert Form builder will give you the option to choose a display type when you insert the input field, and will automatically generate the proper shortcode arguments: https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_field
Forms / Flat:
You cannot choose a different input type, but you can choose whether or not to display "popular terms" and let the User choose from them, in addition to the normal term input field. The drag-and-drop Form builder shows these options in the main taxonomy field options, or the expert Form builder will let you choose when you insert the field then automatically generate the proper shortcode. You can also use the meta box callback function when you edit the custom taxonomy in Toolset > Taxonomies.
Backend :
I'm not aware of a way to adjust the input types for either flat or hierarchical taxonomies in wp-admin, other than a 3rd-party plugin or custom code (provide a meta box callback function when you edit the custom taxonomy in Toolset > Taxonomies).
My issue is resolved now. Thank you!