Passer la navigation

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

This support ticket is created Il y a 1 year, 10 months. 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.

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Christopher Amirian Il y a 1 year, 10 months.

Assisté par: Christopher Amirian.

Auteur
Publications
#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

Les langues: Anglais (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:

lien caché

Thanks.

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