Hey all,
i started playing around with a yii2 installation, but i can’t find how to use input groups in Yii2.
like here: http://getbootstrap.com/components/#input-groups
this is what i got at this moment.
<?=
$form->field( $model , 'size' , [ ] )->textInput( [] );
?>
thanks in advance.
You can use my extension yii2-widgets that handles it straightforward. Refer the input group addons usage/demos.
Something like below:
use kartik\widgets\ActiveForm;
$form = ActiveForm::begin();
echo $form->field($model, 'email', [
'addon' => ['prepend' => ['content'=>'@']]
]);
ActiveForm::end();
If you do not want to use the extension… you need to play around with the template property of yii active form/field.
I got it working, thanks allot!.