29 Nov 2015 at 10:08 UTC
7 Oct 2016 at 08:21 UTC
When you create a form with following field, if the state makes it invisible, the format selection stays visible.
It should also hide the format selection.
$form['foo'] = [ '#type' => 'text_format', '#format' => 'plain_text', '#editor' => true, '#states' => array( 'visible' => array( ':input[name="bar"]' => array('checked' => TRUE'), ), ), ];
State not visible: