A
A
Anton Natarov2016-04-18 15:25:55
Yii
Anton Natarov, 2016-04-18 15:25:55

Yii2 How to create your own custom form?

Good afternoon, tell me please. How can I drag my form onto an Active Form widget?
For example :

<div class="payment-input">
       <span>Номер телефона</span>
       <input type="text" value="+7 (***) ***-**-**" class="p-phone" />
</div>

I can't figure out how to bring the ActiveForm to my view. And if you refuse the widget, then how to prescribe your fields so that they get into the form model and are subsequently validated? If possible with an example, otherwise I'm a military man, I need it loudly and three times: D

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2016-04-18
@HanDroid

Use the helpers Html::activeTextField, Html::activeCheckbox, etc., and do the layout of the form yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question