How to delete <div> wrap from form field?

I tried to do this via setup


'template' => '{input}'

in


$form->field

but it wraps my input in <div>. And I tried to set


$field->template

directly after form field setup, but div was added in rendering. If I don’t want to have any divs in some html inputs, how can I do this? Thanks!

Not sure if I understand your question correctly.

But for example unsing:




    echo Html::activeTextInput($my_model, 'my_attribute');



Will render the input field without any divs like:




<input type="text" id="my_model-my_attribute" name="my_model[my_attribute]">



Base HTML Helpers:

http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html

Hope this helps.

Regards