Skip Navigation

[Resolved] Data Dependent Dispay Filters

This support ticket is created 7 years, 2 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 7 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#565694

I am trying to display an editable field on a custom post only if a checkbox on a parent page has been checked. Using the conditional logic I am trying advanced text mode and trying to add $parent in some way. Can you offer any direction on how to do this?

#565724

Dear james,

I assume we are talking about shortcode [wpv-conditional],
I suggest you try this:
1) You can display the custom checkbox field value of parent post/page by adding attribute "id=$parent-slug" into Types shortcode [types], for example:
[types field="xxxx" id="$yyyy"][/types]
See our document:
Displaying Fields of Parent Pages
https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/
Checkbox
https://toolset.com/documentation/customizing-sites-using-php/functions/#checkbox

2) Then use above shortcode insider the shortcode [wpv-conditional] for comparison, see our document:
Using shortcodes in conditions
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/

#565954
Screen Shot 2017-09-01 at 8.57.30 AM.png

This is not what I am looking to do. I have created a parent post. In the parent post there will be a checkbox in the editor. If the checkbox is checked, an editable field will be displayed in the child post editor. If not, it will not appear.

In the 'Post Field Group' for the child post I am trying to create a conditional statement that will query whether or not the parent post value is 'checked'. I have tried to write a conditional query myself but it is not working. The slug is 'airport-transportation-available'. See screenshot:

#566278

Thanks for the details, I assume we are talking about the "Conditional display" of custom field setting in admin side, please check our document:
https://toolset.com/documentation/user-guides/types-custom-fields-conditional-display/
Section "Conditional fields based on expressions", there isn't such a built-in feature to use parent post field in the "Conditional" logic, if you agree, we can take it as a feature request, our developers will evaluate it.