How to generate Form that extends model

Hi, How can I generate a form that will extends model just like the default LoginForm.php…but I am having difficulty to generate this in Gii Tool.

Thank you in advance.

What is your difficulty exactly?

I haven’t used it yet (will be playing with it tomorrow) but I assume from the info in gii/form that you need to create your own form model and then use that model to generate the fronted for your form. The API docs has a guide on writing form models here:


http://www.yiiframework.com/doc-2.0/guide-start-forms.html

Cheers

Ash

I mean I want to generate a Form in Gii tool that will extends a model just like the default models/LoginForm.php,…I tried to generate and It extends to ActiveRecord also the generated Form is not the same content in the LoginForm.php…

Best Regards.

ezekel

Hi, Thank you for the link,I already read this,I am just wondering If I could generate this in Gii Tool.

Thank you.

Hi, Thank you for the link,I already read this,I am just wondering If I could generate this in Gii Tool.

Thank you :)