Skip Navigation

[Resolved] "If conditional" for a field doen't work

This support ticket is created 3 years, 7 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 4 replies, has 2 voices.

Last updated by Minesh 3 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#2069187
Immagine 2021-05-26 201644.jpg
Immagine 2021-05-26 201551.jpg
Immagine 2021-05-26 201333.jpg
Immagine 2021-05-26 201308.jpg

Hi

I'm using an "If Conditional field" in this page:
hidden link
I've a custom field that has value 1 or 0

In attached there are the screenshots of the various settings made:
- The "If" condition where I check if the field has a value of "1" (I also set the debug to verify its operation).
- I also set the same field to see its value.
- So in the listing page I see the debug and field value, these values don't match.

Where am I wrong? why this difference?

Thank you
Greetings

#2069751

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please share admin access details and tell me what field you want to apply conditional and what thing you want to display conditionally?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2070279

Minesh
Supporter

Languages: English (English )

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

Yes - I was able to see the issue but for now as a workaround I've removed the conditional block and added the shortcode block and within the shortcode block I've added the following code:

[wpv-conditional if="( '[types field='stp_utenti_usr_fotopubblica' output='raw' item='@stp-azienda-stp-utente.child'][/types]' eq '1' )"]

 [types field='stp_utenti_usr_foto' title='%%TITLE%%' alt='%%ALT%%' size='custom' width='100' height='100' resize='proportional' item='@stp-azienda-stp-utente.child'][/types]

[/wpv-conditional]

I can see it works as expected.

#2070343

Ok, it works with short code, but why it doesn't work with builder component?

#2070349

Minesh
Supporter

Languages: English (English )

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

I will check with my test site and if reproduced I will escalate it to the Deva.