Support › Meta Box Conditional Logic › How to hide group field when post field is empty?Resolved
What is the syntax for hiding a (group) field when another field (type='post') is null?
I've tried several different variations like this on my group field:
'hidden' => array('post', '!=', null),
where 'post' is the metabox id of a sibling field. e.g.:
'name' => __('Post'),
'id' => 'post',
'type' => 'post',
'field_type' => 'select_advanced',
'post_type' => array('recipe', 'post'),
'placeholder' => 'Select post',
'desc' => 'A recipe or post that appears in the list.'
Hi, the problem is your post field ID. On the editing screen, the #post is used for the post form, so you can't use ID post. You need to change the ID of the post field.
Then, you can hide the group if the field is null with this condition:
'hidden' => array( 'post2', '=', '' ), // post2 is post field ID.
PS: Please renew your license to get updates of extensions and support.