Conditional visibility for module options (Show/Hide Dependency)

In Live Composer version 1.1 and above you can show/hide module styling controls based on selected option in the master control.

See dependent_controls part in the code below.

  • If Phone option selected Live Composer show control with id = link.
  • If Desktop option selected it will show amount and orientation controls.
array(
	'label' => __( 'Show On', 'live-composer-page-builder' ),
	'id' => 'css_show_on',
	'std' => 'desktop tablet phone',
	'type' => 'checkbox',
	'choices' => array(
		array(
			'label' => __( 'Desktop', 'live-composer-page-builder' ),
			'value' => 'desktop',
		),
		array(
			'label' => __( 'Tablet', 'live-composer-page-builder' ),
			'value' => 'tablet',
		),
		array(
			'label' => __( 'Phone', 'live-composer-page-builder' ),
			'value' => 'phone',
		),
	),
	'dependent_controls' => array(
		'phone' => 'link',
		'desktop' => 'amount, orientation',
	),
),