3 view form

So I have just created a form which has 3 views:

View1 - application/create.php: Display User data input form

View2 - application/confirm.php: Display Confirmation page

View3 - application/thanks.php: Display Thanks page

Now I can obviously POST all values from view1 to view2, but then I also need to post the values to view3 (this is where the values get saved to the database).

I am only displaying the values on view2, so is it possible to post the values dynamically via the controller, or do I need to set up individual hidden fields on view2?


you can use renderPartial, like update and create(using _form) (created by crud shell comand)

in create.php:

<?php echo $this->renderPartial('_form', array(



)); ?>

This outputs the form with the layout in _form.php

That is working fine for me. So what do I do next?

Ok, I think now I understand

you have a code like this in your create action


  if ($model->validate()) 


and ,in confirm action, you have a code like

  $model->attributes=$_POST['TableName'];  // (***)

  $model->save() ;


and the options are

  1. hidden fields, for this to work (***)

    putting the same thing twice

  2. or try this

<?php echo CHtml::activeTextField($model,'fieldName',array('readonly'=>'readonly')); ?>

greetings, until next week, Merry Christmas