Skip Navigation

[Resolved] Classified’s Site: I want “Locations” as a drop-down taxonomy select item

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to display taxonomy field as select dropdown with CRED form

Solution:
To make taxonomy field as select dropdown, you need to use following code:

[cred_field field='taxonomy-slug' display='select' single_select='true']

Where:
Replace 'taxonomy-slug' with your location taxonomy slug

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/classifieds-site-i-want-locations-as-a-drop-down-taxonomy-select-item/#post-622006

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field

This support ticket is created 6 years, 9 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by PaulS4783 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#621969

Hi.

I am using the Classifieds reference site.

We want to create the 42 prefectures (states) of Japan as locations and have them available in English/Japanese.
In other words, rather than have a flat "tag-like" structure for "Location" we want something more like a pre-defined "category" structure.

I can see where to make the change under Toolset / Edit Taxonomy / Taxonomy Type / Hierarchical.

However, the CRED Forms to edit existing listing Locations still show as checkboxes (allowing multiple selections).
How can we make sure the Edit Forms AND the Listing Creation Forms show the "Location" taxonomy as a drop down, SINGLE selection only field?

Do we only need to edit CRED forms or also other parts of ToolSet?

#621995

Any suggestions?

#622006

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - to make taxonomy field as select dropdown, you need to use following code:

[cred_field field='taxonomy-slug' display='select' single_select='true']

Where:
Replace 'taxonomy-slug' with your location taxonomy slug

More info:
=> https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field

-- display. Optional.
Used by fields for Hierarchical Taxonomies (like Categories) to signify the mode of display (ie. "select" or "checkbox").

-- single_select. Optional. Boolean.
If the display=select argument is set, then single_select=true will only allow a single option to be selected (by default multiple options can be selected). Defaults to fals

#622357

Seems to work. Thank you!