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.
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. ...