Skip Navigation

[Closed] Conditional in custom field

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

Last updated by Shane 2 years, 5 months ago.

Assigned support staff: Shane.


I'm tryng to add a condition to custom field.
I added this:

($(tipologia-partenza) eq 2)

But it does not work because I need to set the field "tipologia-partenza" as raw value.

How can I do?



Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Domenico,

This is for the views conditional correct?

Is this the entire conditional statement ? or is this the conditional statement used in the Field Groups section.

Please clarify for me Also what kind of field is the "tipologia-partenza", could you send me a screenshot of the field structure in the edit field group page?



Hi Shane, no it is for custom field conditional display.

If I use the code as sent it does not work because the value returned is a sentence "Partenza a scelta del cliente" as you can see in immagine2.

I need to "transform" it in raw value (2).



Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2019-04-05 at 3.15.08 PM.png
Screenshot 2019-04-05 at 3.15.00 PM.png
Screenshot 2019-04-05 at 3.14.48 PM.png
Screenshot 2019-04-05 at 3.14.39 PM.png

Hi Domenico,

This should work fine since the value of the field is what will be returned in the conditional, so having
($(tipologia-partenza) eq 2) is correct.

If it doesn't work then that is quite strange as I just test this with a select field as well. See Screenshots.

Would it be possible to gain access to the site to view this for you ?


The topic ‘[Closed] Conditional in custom field’ is closed to new replies.