Skip Navigation

[Closed] Case testing custom-field value inside of Fields and Text block

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.

This topic contains 1 reply, has 2 voices.

Last updated by Christopher Amirian 5 months, 2 weeks ago.

Assisted by: Christopher Amirian.

Author
Posts
#2706376

In my CPT fields, I have a radio button field named "news-events-post-type " that is set up as follows:

Display Text. Field Value
"Option 1 text" 1
"Option 2 text" 2

In the Fields & Text block inside of my view I am trying to display a different field based upon the value of the radio button field described above.

Currently I have the following:

[wpv-conditional if=“($(wpcf-news-events-post-type) eq '1' )”][types field='news-events-post-mcc-boilerplate'][/types][/wpv-conditional]

This is always failing because it seems that it is comparing the value '1' to the display text ("Option 1 text") instead of the field value ("1")

I cannot figure out what I am doing incorrectly here and would appreciate any guidance.

thx

#2706713

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Please check for the empty value and see if it works:

https://toolset.com/course-lesson/using-toolset-conditional-block/#checking-for-empty-values

If not, please create a sample radio custom field like the one you added on your website and try to add a view with the conditional and I will test for you:

hidden link

Thanks.

The topic ‘[Closed] Case testing custom-field value inside of Fields and Text block’ is closed to new replies.