Examples: Inline Layout

If layout is set to inline an inline form is rendered.

<?php $form = $this->beginWidget('Codemix\BS3ActiveForm', array(
    'layout' => 'inline',
)); ?>

Following is a list of the most common form elements to exemplify different options and validation states.

Note: While the class does support error messages and help texts in this mode, Bootstrap 3 does not really display them nicely. That's why error messages are disabled by default in this mode. You can enable them at your own risk through enableErrorBlock in the group options or on the form. Also note that input groups are not really supported well by Bootstrap 3, as they span the full width.


Default Options

<?= $form->group('textField',$model, 'demo') ?>
<?= $form->group('checkBox',$model, 'demo') ?>
<?= $form->group('dropDownList',$model, 'demo', $opts) ?>

Help Text

Help text

Help text

Help text

<?= $form->group('textField',$model, 'demo', array(
    'helpText' => 'Help text',
)) ?>
<?= $form->group('checkBox',$model, 'demo',array(
    'helpText' => 'Help text',
)) ?>
<?= $form->group('dropDownList',$model, 'demo', $opts,array(
    'helpText' => 'Help text',
)) ?>