A
A
Artur Khismatullin2017-04-11 18:03:11
Yii
Artur Khismatullin, 2017-04-11 18:03:11

How to remove extra information generated by $form->field()?

I want to make an input without any extra tags, style classes and attributes. Or is it easier to make a new widget?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2017-04-11
@Nachalnik

Everything can be customized

<?= $form->field($model, 'modul_name',['template'=>'{input}'])->label(false) ?>

D
Dmitry, 2017-04-11
@slo_nik

Good evening.
Use Html::input()
This will create an input without extra classes, attributes, and the like. You only need to specify the input type

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question