[Resolved] Conditional post fields not working in admin

This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Our next available supporter will answer your ticket in about 7.18 hours from now. Thank you for your understanding.

Related documentation: Adding Custom Fields to WordPress

This topic contains 2 replies, has 2 voices, and was last updated by  daveM 4 months, 1 week ago. The support staff assigned to this topic is Christian Cox.

Viewing 3 posts - 1 through 3 (of 3 total)
Author
Posts
#547079

I am trying to create 4 post fields and hide #4 if #3 is empty, hide #3 if #2 is empty, and hide #2 if #1 is empty. All of this is for the back-end admin options only—not front-end.

I'm using the post fields conditional setting: "Custom Field" "> is greater than" "0" (see attached screenshot).

The value of the custom post field will be different URLs, so there is no exact value to compare. Is this the correct setting and value("0") to show/hide a field based on whether the field is empty or not?

Thanks!

#547142

Christian Cox
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/New_York (GMT-05:00)

Hi, the best way to set up this conditional is to use the != (not identical to) operator, and leave the value empty:
[YouTube Video #1] [!=(not identical to)] [leave the last input blank]

See the attached screenshot for an example. Let me know if this does not resolve the issue for you, and I'll take another look.

#548777

Thanks, I ended up not needing the conditional after all, but thank you very much for the reply!

Viewing 3 posts - 1 through 3 (of 3 total)