Maslosoft Framework Logo Maslosoft Framework Documentation
Flexible Application Foundation


Collapsible Block

Collapsible block is meant to be used to hide some part of form when some observable value evaluates to true. It is specifically designed for settings, to allow enabling or disabling some feature parameters.

Example usage:

*
$model = new Collapsible;
echo $form = new ActiveForm([
    'model' => $model
]);

echo CollapsibleBlock::widget([
    'model' => $model,
    'enabled' => Ko::refDataModel($model)->enabled,
    'shown' => $form->renderFields('enabled'),
    'collapsible' => $form->renderFields('title', 'description')
]);

echo $form->close();