This is how i added the icon with text field. Also added the image of generated output. I don't want to use Krajee Yii Extensions. So i started to read the documentation.
$form = \yii\widgets\ActiveForm::begin([
'id' => 'form-id',
'options' => ['class' => 'form-horizontal'],
'enableClientValidation'=> false,
'enableAjaxValidation'=> true,
'validateOnSubmit' => true,
'validateOnChange' => true,
'validateOnType' => true,
'action' => 'youraction',
'validationUrl' => 'yourvalidation'
]);
echo $form->field($model, 'fieldname')->begin();
echo Html::activeLabel($model,'fieldname', ["class"=>"col-sm-3 control-label"]); ?>
<div class="input-group col-sm-4 ">
<span class="input-group-addon">
<span class="glyphicon glyphicon-subtitles"></span>
</span>
<?php echo Html::activeTextInput($model, 'fieldname', [
'class'=>'form-control',
'autocomplete'=>'off'
]
); ?>
</div>
<?php echo Html::error($model,'origin', ['class' => 'help-block']);
echo $form->field($model, 'origin')->end();
\yii\widgets\ActiveForm::end();