Skip Navigation

[Resolved] Conditional taxonomy select box validation (required)

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.

Our next available supporter will start replying to tickets in about 0.67 hours from now. Thank you for your understanding.

This topic contains 2 replies, has 2 voices.

Last updated by andreyD-2 1 month, 2 weeks ago.

Assigned support staff: Waqar.

Author
Posts
#2081657

Hello,

I have a radio buttons that let users select a Section which conditionally displays a select box of Categories with taxonomies.
The problem I am unable to resolve is making Categories select box required. Below is my code, required='true' property doesn't work. Please suggest how to make conditional select box required.

<label for="section" class="form-label">Select Section:</label>
[cred_field field='section' force_type='field' class='form-check-input' output='bootstrap']

<label class="form-label">Select Category:</label>
[cred_show_group if="( $(section) eq 'motorcycles' )" mode="slide"]
[cred_field field='tax-motorcycles' display='select' single_select='true' required='true']
[/cred_show_group]
[cred_show_group if="( $(section) eq 'other' )" mode="slide"]
[cred_field field='tax-other' display='select' single_select='true' required='true']
[/cred_show_group]

#2082319

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

This will require adding some custom script to the form. If you could share the temporary admin login details along with the link to the page with this form, I'll be in a better position to suggest some more pointers.

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#2083351

All good, I decided to proceed the other way