M
M
microf2014-10-19 18:06:10
Yii
microf, 2014-10-19 18:06:10

How to make two ActiveForms on the same page in Yii2?

Hello.
I want to combine the Login and Signin form on one page.
How to do it right?
Make two widgets and place on the page or is there another way?
Somehow make one actionLogin and somehow separate form id? And what to describe in the model?
What is the general algorithm?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Kostyurin, 2014-10-19
@microf

You can make one form, because the fields are the same. To determine whether it is login or registration, you can use a flag and output it as a hidden field. For validation in an action, create a model with the desired scenario.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question