Skip Navigation

[Resolved] custom fields conditional display of hyperlink

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to display conditional display of custom field

Solution:
You can use [wpv-conditional] shortcode to display the conditional output.

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/custom-fields-conditional-display-of-hyperlink/#post-632371

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

This support ticket is created 6 years, 8 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 1 reply, has 2 voices.

Last updated by Minesh 6 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#632128

Tell us what you are trying to do?

I'm trying to create a custom field to be used with my courses templates. I have a question asking if the course is currently 'open' or 'closed'. based on how the clients answers that question when creating new courses, I want the registration link to be visible ONLY if she indicates the course is OPEN.

A secondary issue is how to use the existing field types to create a link with a fixed URL destination? I know how to add a button to the content template, but in order for the button to be conditionally displayed, I think I need to be able to use one of the form fields to make the button / link. That one seems a bit tricky to me. Would be nice if we had an HTML snippet field type instead of only the WYSIWYG editor.

Is there any documentation that you are following?

haven't found anything concrete on my specific need.

Is there a similar example that we can see?

not that I can find.

What is the link to your site?

hidden link

please refer to Toolset > Content Templates > Course BioBasics.

#632371

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

As per our support policy - we will entertain only one question per ticket. This will help other users searching on the forum. Please kindly report your another issue with different ticket. Thank you for understanding.

I will take care of this question:
I'm trying to create a custom field to be used with my courses templates. I have a question asking if the course is currently 'open' or 'closed'. based on how the clients answers that question when creating new courses, I want the registration link to be visible ONLY if she indicates the course is OPEN.

Do you know that you can display the conditional content using the [wpv-conditional] shortcode.

For example:

[wpv-conditional if="( $(wpcf-budget) eq '50' )"] 
Your output
 [/wpv-conditional]

More info:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/