Hi Paul,
We can use the operator !=
to check if the logic field has any value. But this case only works with the code, not in the Builder to avoid broken conditional logic.
'fields' => [
[
'name' => __( 'Text1', 'your-text-domain' ),
'id' => $prefix . 'text1',
'type' => 'text',
],
[
'name' => __( 'Text2', 'your-text-domain' ),
'id' => $prefix . 'text2',
'type' => 'text',
'visible' => [
'when' => [['text1', '!=', '']],
'relation' => 'or',
],
],
],