Hi,
I'm having an issue with custom fields. Since a couple update past, the conditional logic isn't working on the backend of the site, but works well on the front end.
I tried deactivating everything, change theme, etc, but not luck.
I have a 'Testimonial' CheckboxList field with 2 options. Depending of which one is selected (or both) it shows different options to fill info in.
The weird thing is that if I select an option, after a while (maybe a minute) or randomly the hidden fields are showing, but don't disappear if I uncheck the option.
Here is the code of a test I made to show the issue:
<?php
add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
function your_prefix_function_name( $meta_boxes ) {
$prefix = '';
$meta_boxes[] = [
'title' => __( 'test', 'your-text-domain' ),
'id' => 'test',
'fields' => [
[
'name' => __( 'Checkbox List', 'your-text-domain' ),
'id' => $prefix . 'checkbox_list_1',
'type' => 'checkbox_list',
'options' => [
1 => __( '1', 'your-text-domain' ),
2 => __( '2', 'your-text-domain' ),
],
],
[
'name' => __( 'Text 1', 'your-text-domain' ),
'id' => $prefix . 'text_tzwv68o6dh',
'type' => 'text',
'visible' => [
'when' => [['checkbox_list_1', 'contains', 1]],
'relation' => 'or',
],
],
[
'name' => __( 'Url', 'your-text-domain' ),
'id' => $prefix . 'url_gm8gpywfp5',
'type' => 'url',
'visible' => [
'when' => [['checkbox_list_1', 'contains', 2]],
'relation' => 'or',
],
],
],
];
return $meta_boxes;
}