multimodelform submit

Hi guys,

Kindly someone help me solve a problem with multimodelform extension. It’s doing validation well but when all errors clear, the form doesn’t do anything when I click submit.

I have two tables namely requisitions and requisitionitems

Requisition table fields

requisitionid (PK) auto_increment



requisitionitems table fields

id(PK) auto_increment






My controller code

	public function actionNewrequisition()




		$model=new Requisitions;


                $reqitems=new Requisitionitems;


                $validatedMembers = array();  //ensure an empty array






			if(MultiModelForm::validate($reqitems,$validatedMembers,$deleteItems) && $model->save())


                            $masterValues = array('requisitionid'=>$model->requisitionid);
















My View Code

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(


	// Please note: When you enable ajax validation, make sure the corresponding

	// controller action is handling ajax validation correctly.

	// There is a call to performAjaxValidation() commented in generated controller code.

	// See class documentation of CActiveForm for details on this.









	<p class="note">Fields with <span class="required">*</span> are required.</p> 

	<?php echo $form->errorSummary($model); ?>

        //I left out the master table code....          





                    $requisitionitemsFormConfig = array(

                        'elements' => array(


























                            'id' => 'id_member', //the unique widget id

                            'formConfig' => $requisitionitemsFormConfig, //the form configuration array

                            'model' => $reqitems, //instance of the form model

                            'tableView' => true,

                            //if submitted not empty from the controller,

                            //the form will be rendered with validation errors

                            'validatedItems' => $validatedMembers,

                            //array of member instances loaded from db

                            //'data' => $reqitems->findAll('requisitionid=:requisitionid', array(':requisitionid'=>$model->requisitionid)),






    <div class="row buttons"></div>

		<?php echo CHtml::submitButton('Submit',array('class'=>'btn btn-primary')); ?>


<?php $this->endWidget(); ?>

</div><!-- form -->

Find the attached screen shot of my view


I solved the above problem. It was as a result of a required field in the dependent table.

My other problem is the table view.

Table view doesn’t show the first row until I click on ‘Add Item’.


[*]Is it possible to get the first row show automatically?It’s currently showing just labels in table heading

[*]Is it possible to make the first row mandatory to ensure at least one dependent item is saved?

[*]How can I show clone ids in the first column of each new row?


thanks for your help.