How to delete <div> wrap from form field?

I tried to do this via setup

'template' => '{input}'



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


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:

Hope this helps.