show hide columns fields in a same raw using the conditional logic

Support MB Columns show hide columns fields in a same raw using the conditional logic

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6340
    uththamaguththamag
    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

    #6345
    Tan NguyenTan 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 2 posts - 1 through 2 (of 2 total)
  • The topic ‘show hide columns fields in a same raw using the conditional logic’ is closed to new replies.