Skip Navigation

[Resolved] Why can't I add my own css class to a taxonomy select box field in my form

This support ticket is created 4 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 2 replies, has 2 voices.

Last updated by Minesh 4 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1515207

Tell us what you are trying to do?
I have made a form on this URL = hidden link
If you scroll down to the 'Experience and Management' section, you will see that the select boxes I am using there, I am able to style with my own css class. These are just 'custom fields' within my custom post type.
However, at the top of the page you will see 'Organisation'. This is also a select box / dropdown input field. However, it seems that because this is a 'taxonomy' rather than a custom field, when I input my css class to it, it doesn't work.
My markup in the form editor for the 'organisation field is = [cred_field field='organisation' class='uk-select' force_type='taxonomy' output='bootstrap' display='select' single_select='true']
But the 'uk-select' class does not show in the code.

For my custom field, my markup in the form editor is = [cred_field field='em1' force_type='field' class='uk-select' output='bootstrap']
And in this case, the css class DOES show in my code.

Why can't I do the same for a taxonomy as I can for a custom field please?

Is there any documentation that you are following?
Just instructions on your website

Is there a similar example that we can see? No

What is the link to your site?
hidden link

Thank you 🙂

#1516401

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Yes - I can see that you can not add the custom class to the taxonomy field displayed as a single select dropdown.

I will check this further and report accordingly. Please hold on for further updates.

#1518133

Minesh
Supporter

Languages: English (English )

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

I checked further and the class attribute is not applicable to taxonomy, radios and checkboxes fields. I've filed a request to update our Document page.
=> https://toolset.com/documentation/user-guides/front-end-forms/cred-shortcodes/#cred_field

However - you are welcome to file a feature request for same:
=> https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/