Skip Navigation

[Resolved] Class attribute is not generated for Select fields for taxonomies

This support ticket is created 6 years, 3 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 6 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#1137532

I have created a field within my form to display taxonomy terms as single select field. I have created the field using the following tag:

[cred_field field='release' force_type='taxonomy' class='form-control' output='bootstrap' display='select' single_select='true']

which generates:

<select id="cred_form_576_1-select-3-1540985042" class="wpt-form-select form-select select" data-wpt-type="select" name="release[]">

I was expecting to see the "form-control" class to be added to the list of classes that are generated on the front end so that the styling of the field is aligned to the remaining fields, however the form-control class is not added to the html output.

Note, when I do the same thing with a standard select field e.g. as per below:

[cred_field field='status' force_type='field' class='form-control' output='bootstrap']

and the class is generated correctly in the output, like so:

<select id="cred_form_576_1-select-2-1540985042" class="form-control wpt-form-select form-select select js-wpt-validate" output="bootstrap" ...>

How do I force the cred field to add the "form-control" class to the generated output?

#1137776

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for contacting our support forum.

This actually works fine for me and from your debug information I see that you are running an older version of views.

Could you update to the latest version and let me know if the issue is resolved?

Thanks,
Shane

#1142479

Hi Shane,

I had to downgrade to the older version of Views due to conflicts between Elementor and Toolset Views Content Templates. Having said that, I temporarily upgraded to the latest version and I can confirm that the issue still exists i.e. the form-control is not returned in the HTML output. I have done a css workaround for now, but it would be good to fix it properly and use the form-control class like for the other fields.

#1142518

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Would you mind allowing me to have admin access to the website so that I can have a look at this for you ?

The private fields have been enabled for your next response.

Thanks,
Shane