If you've just added a HardwareGroup, then surely you are then going
to add some Hardware into it and as such being taken to view that
group is going to save you time as any add link in that view would
preselect the newly created HardwareGroup.
If you want to do it your way then in the HardwareGroup controller
have the following
if (!$this->data['HardwareGroup']['referer']) {
$this->data['HardwareGroup']['referer'] = $this->referer();
}
Then in your add form add a hidden field
$form-input('HardwareGroup.referer', array('type'=>'hidden'));
Then after a successful save in the controller
$this->redirect($this->data['HardwareGroup']['referer']);
Paul.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" 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