KeepLearning Posted March 15, 2013 Share Posted March 15, 2013 Page 108, version 0.5 The following sentence seems to jump over several points, each of which needs a more detailed explanation. Consequently, I cannot understand this sentence at all: "the form used to both create and edit a record is its own file, and that file can be included by both create.php and update.php (those two files start by changing the headings above the form)." Larry, can you break this down please? Thanks. Link to comment Share on other sites More sharing options...
Larry Posted March 15, 2013 Share Posted March 15, 2013 Sure. There is a file named _form.php. That file has a form. That same form is used to both create new records and update existing records. That same form file is included by two other files. Those two other files are create.php and update.php. The main difference between the two is the headings above the form. This also may make more sense to you if you look at the code itself. Link to comment Share on other sites More sharing options...
KeepLearning Posted March 15, 2013 Author Share Posted March 15, 2013 Thanks for explaining that. I understand it better now. I guess this is the include code: <?php echo $this->renderPartial('_form', array('model'=>$model)); ?> Link to comment Share on other sites More sharing options...
Larry Posted March 15, 2013 Share Posted March 15, 2013 Yes, exactly. Link to comment Share on other sites More sharing options...
Recommended Posts