Saltar navegación

[Cerrado] 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.

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Christopher Amirian 1 year, 10 months ago.

Asistido por: Christopher Amirian.

Autor
Mensajes
#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
Colaborador

Idiomas: Inglés (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:

enlace oculto

Thanks.

El debate ‘[Cerrado] Case testing custom-field value inside of Fields and Text block’ está cerrado y no admite más respuestas.