Skip Navigation

[Resolved] Display a post field conditionally if a taxonomy of a custom taxonomy is checked

This support ticket is created 7 years, 7 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

Last updated by Nicholas 7 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#437954

Hello Toolset Team!

I have a custom Taxonomy called "Profile-Products". To this taxonomy I added several new "items" manually. I.e. "product1" "product2" "product3".

Today I am creating a post form (CRED) where the user can select from the list of this custom taxonomy (display="checkboxes").

Now I would like the to display a post field conditionally only if a for example the taxonomy "product1" is checked.

Only if this taxonomy is check the post field should appear.

How is this possible?

Have a nice day.

Nicholas

#438009

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

We have detailed Doc about how you can check taxonomy with [wpv-conditional] shortcode:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/displaying-taxonomies-conditionally/

For example:

[wpv-conditional if="( has_term('Chinese', 'foreign-language', null) eq '1' )" ]
 
 <p class="special">This consultant speaks Chinese!</p>
 
[/wpv-conditional]

Where:
- 'Chinese' is the term name
- 'foreign-language' is the custom taxonomy slug

#438060

Hello Minesh!
Thanks for your help I got it figured out using the [cred_show_group.... shortcode for CRED. [wpv-conditional... didn't work for me.

One more thing.

What if I have a taxonomycalled vehicles with i.e.: cars, motorcycles and bikes
and then I have a taxonomy called equipment with i.e.: mirror, license plate etc.

Let's say in a CRED form I select bikes and then based on this selection only the relevant equipement should display (conditionally)

How's that possible with CRED?

#438136

Minesh
Supporter

Languages: English (English )

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

ahh - You want to display conditional output with CRED. Yes - you can display content based on taxonomy term.

We have detailed documentation for that.
=> https://toolset.com/documentation/user-guides/conditional-display-for-form-inputs/
=> https://toolset.com/documentation/user-guides/cred-conditional-display-engine/

#438174

Thank you!

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