Custom Fields
Re-Envisioned
Support Meta Box Columns show hide columns fields in a same raw using the conditional logic

  • Creator
    Topic
  • #6340
    uththamag
    Participant

    Hi,

    Is it possible to show hide columns fields in a same raw using the conditional logic extension?

    Ex: I want to show/hide(switch) fields by selecting a layout in the same row.

    three 6 col fields in a row and one is hidden by defaults.

    Thank you

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #6345
    Tan Nguyen
    Participant

    Dear uththamag,

    Imagine you have a field to select layout like so:

    
    array(
    	'name'    => __( 'Layout', 'rwmb' ),
    	'id'      => 'layout',
    	'type'    => 'select',
    	'columns' => 12,
    	'options' => array(
    		'one' => '1 Col', 
    		'two' => '2 Cols',
    		'three' => '3 Cols'
    	)
    ),
    

    To toggle a field with selected value, just add:

    
    'visible' => ['layout', 'SELECTED_VALUE'],
    

    SELECTED_VALUE can be one, two, or three like the above example.

Viewing 1 replies (of 1 total)
  • The topic ‘show hide columns fields in a same raw using the conditional logic’ is closed to new replies.