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?
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/
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:
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.