if (!$this->data['HardwareGroup']['referer']) { $this->data['HardwareGroup']['referer'] = $this->referer(); }
Needs to go into your controllers add/edit methods and is simply doing the job of checking if there is already a referer value in the data array(i.e. the form has been submitted and there were errors so it's been shown again). If it is the first time the form has been requested, it inserts the forms referring url into the data array and you need to include that value in your add/edit form (hidden field as shown above) for it to be passed back to the controller after submitting the form. If this $this->data['HardwareGroup']['referer'] is being set as $this- >referer() every time then you haven't included the value in your form. 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en