<?php $form = ActiveForm::begin() ?>
<?= $form->field($model, 'demo', [
'inputTemplate' => '<div class="input-group"><span class="input-group-addon">@</span>{input}</div>',
]); ?>
<?= $form->field($model, 'demo', [
'inputTemplate' => '<div class="input-group"><span class="input-group-addon">@</span>{input}'.
'<span class="input-group-addon">.00</span></div>',
]); ?>
<?= $form->field($model, 'demo', [
'inputTemplate' => '<div class="input-group"><span class="input-group-addon">'.
Html::checkbox('test').'</span>{input}</div>',
]); ?>
<?= $form->field($model, 'demo', [
'inputTemplate' => '<div class="input-group"><span class="input-group-btn">'.
'<button class="btn btn-default">Go!</button></span>{input}</div>',
]); ?>
<?php $menu = Menu::widget([
'options' => [
'class'=>'dropdown-menu',
],
'items' => [
['label' => 'Action', 'url' => '#'],
['label' => 'Another Action', 'url' => '#'],
['options' => ['class'=>'divider']],
['label' => 'Separated Link', 'url' => '#'],
],
]); ?>
<?= $form->field($model, 'demo', [
'inputTemplate' => '<div class="input-group"><div class="input-group-btn">'.
'<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action '.
'<span class="caret"></span></button>'.$menu.'</div>{input}</div>',
]); ?>
<?= $form->field($model, 'demo', [
'inputTemplate' => '<div class="input-group"><div class="input-group-btn">'.
'<button class="btn btn-default">Action</button>'.
'<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">'.
'<span class="caret"></span></button>'.$menu.'</div>{input}</div>',
]); ?>
<?php ActiveForm::end(); ?>