O'Reilly logo

Web Application Development with Yii 2 and PHP by Jeffrey Winesett, Mark Safronov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. The Active Form Primer

When making the Yii-flavored user interface in Chapter 11, The Grid, we centered only around the GridView widget, as it was the topic of the chapter. But there is another important part of any web application, and it's an HTML form.

The Yii 2 framework provides a very robust and convenient-to-use widget called ActiveForm, which can semi-automatically construct an HTML form for us given the ActiveRecord instance describing the model being manipulated. We'll just continue from where we stopped, at the very end of Chapter 11, The Grid.

Making the Edit form for customer

Our Customer models are already being stored in two separate tables in the database, and two different active records are used to create a single customer. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required