Skip Navigation

[Resolved] How to order taxonomy in a select field using a form?

This support ticket is created 2 years, 10 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 1 reply, has 2 voices.

Last updated by Minesh 2 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#2302985

Tell us what you are trying to do?
I have multiple forms where I want to user to be able to get hold of one particular category without the hassle of scrolling through the whole list of categories.
I want to order my taxonomies by slug, since then I can simply just rename the slut to 0-slugname and make it appear at the top.

Is there any documentation that you are following?
Been looking all over the forum but all references I can see are related to a view, where I can change order.

Is there a similar example that we can see?
This is the code within the form. As you can see I've added "taxonomy_order='ASC' taxonomy_orderby='slug' ", but it doesn't work.

<div class="form-group">
<label for="%%FORM_ID%%_fran-kajplats">[cred_i18n name='fran-kajplats-label']Select from:[/cred_i18n]</label>
[cred_field field='fran-kajplats' force_type='taxonomy' output='bootstrap' display='select' single_select='true' taxonomy_order='ASC' taxonomy_orderby='slug']
</div>

#2303053

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

As you can see with the Toolset Form's [cred_field] there is no argument available to order the taxonomy terms displayed as select:
=> https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_field

You can workaround it by the view that outputs the JSON content and adding the Generic field but then you will also have to add "cred_save_data" hook to save the taxonomy terms. If you need this workaround, please let me know.

You can file a new feature request using the following form:
- https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/