For validation, just use
$this->Order->set( $this_steps_data );
if ( $this->Order->validates() ){
// all ok, save in session and go to next step
} else {
// not ok, show this step again to display errors
}
As long as your validation rules are standard Cake ones (which assume
if a field is not included, that it does not need to be checked), this
should work ok. If you have custom validation to ensure a field is
provided, you'll need to deal with that.
For saving, you need to construct a single model array, and save that.
You can't have $this->Order->Save( $part1_data, $part2_data,
$part3_data ). You will need to have something like
$order_data = am( $part1_data, $part2_data, $part3_data );
$this->Order->save( $order_data );
Or, perhaps the FormWizard that Ian linked to will be sufficient...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---