Skip Navigation

[Resolved] Conditional display of CRED post fields based on taxonomy

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 2 replies, has 2 voices.

Last updated by Brad Tipper 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#547310
Screenshot 2.png
Screenshot 1.png

Evening all,

I've got a post type "Enquiries" with a custom taxonomy "Job Types" attached (see screenshot 1).

I've then got a CRED form to create "Enquiries" with a select field that populates with this custom taxonomy (see screenshot 2).:

[cred_field field='job-type' display='select' select='true' single_select='true' output='bootstrap']

And, the following to show/hide groups of fields based on the type of enquiry(see screenshot 2):

[cred_show_group if="($(job-type) eq  'tyres' )"  mode='fade-slide']

But it isn't working. Selecting "tyres" in the dropdown doesn't display the post fields associated with tyres. Any ideas why?

I've been following the instructions here: https://toolset.com/forums/topic/conditional-display-based-on-taxonomy-selection-in-a-cred-form/

Thanks for your help!

#547383

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Could you please try to replace taxonomy term 'tyres' with 'tyres' term ID.

For example:

[cred_show_group if="($(job-type) eq  '9999' )"  mode='fade-slide']

Where:
- Replace 9999 with 'tyres' term ID

#547705

Perfect! Should have thought of that myself.

Cheers.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.