Hi there,
I have a MB Frontend submission form. I use a template (EG: template_x.php) where users submit a post for the first time, where the post is set to a 'pending' status when submitted. I have a second template (EG: template_y.php) where users can edit their post once it has been reviewed by an admin and set to a 'publish' status. Both templates use the same frontend form and custom fields. All works fine.
The problem
============
I have a field that I only wish to show in 'template_x.php' and not in 'template_y.php'. So I turned on the conditional logic extension in AIO and in my field added the following:
[
'name' => __( 'Choose option', 'text-domain' ),
'id' => $prefix . 'choices',
'type' => 'radio',
'desc' => __( 'Field description', 'text-domain' ),
'options' => [
'firstchoice' => __( 'Choice One', 'text-domain' ),
'secondchoice' => __( 'Choice Two', 'text-domain' ),
],
'required' => true,
'inline' => false,
'hidden' => [ 'page_template', 'template_y.php' ], // Hide field in this template
],
Unfortunately, this does not seem to hide this field within 'template_y.php' as expected. Instead the field is still shown in both templates. I have also tried the inverse but the result is the same?
I have also tried putting in the full path to the template. EG:
'hidden' => [ 'page_template', '../path-to-template/template_y.php' ],
But makes no difference?
I am not seeing any PHP or Console errors?
Am I misunderstanding how this feature should work?
I look forward to your response.