How to simplify the output text field with the addon?

Hi friends, it's me again :)

Need over the GridView control in the toolbar display the search box like this:
demos.krajee.com/widget-details/active-field#butto...
but the author himself on the forum recommends this:
use kartik\widgets\ActiveForm;
$form = ActiveForm::begin();
echo $form->field($model, 'search', [
 'addon' => ['append' => ['content'=>'GO']]
]);
ActiveForm::end();

Be sure to do this, use the ActiveForm? It is possible as that easier to deduce the usual method of Html class ?
June 10th 19 at 14:55
1 answer
June 10th 19 at 14:57
Paste the html that gets in the way without any problems. Copy the code directly from the website kartik and styles and all.
hampered by a lack of understanding where does $form
echo $form->field($model, 'username', [
 'addon' => [
 'append' => [
 'content' => Html::button('Go', ['class'=>'btn btn-primary']), 
 'asButton' => true
]
]
]);

I need when entering text to filter data in a gridview that meet the criteria in this field - audrey_Kautz commented on June 10th 19 at 15:00
and thank you for your blog, have been studying for a couple of days ) - audrey_Kautz commented on June 10th 19 at 15:03
I said it wrong. I can see where does the $form, I don't understand how it integrated in the settings toolbar:

'toolbar' => [
 ['content' => 
 Html::button('<i class="glyphicon glyphicon-plus"></i>', ['type' => 'button', 'title' => 'Create', 'class' => 'btn btn-success', 'onclick' => "]) . ''.
 Html::a('<i class="glyphicon glyphicon-repeat"></i>', ["], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => 'Refresh'])
],
'{export}',
'{toggleData}',
 ],
- audrey_Kautz commented on June 10th 19 at 15:06
hampered by a lack of understanding where does $form

well, from here:
$form = ActiveForm::begin();
In this variable an instance of the class kartik\widgets\ActiveForm and ->field , respectively, a method that pulls the instance of another class

I said it wrong. I can see where does the $form, I don't understand how it integrated in the settings toolbar

I don't use kartikulam gridView, I prefer standard. Therefore, the concept does not need that there is a 'toolbar' and what data can be overridden. But the image is usually extensive documentation, so there should definitely be an answer. - Henderson_Beat commented on June 10th 19 at 15:09

Find more questions by tags Yii