In several applications I've developed, on the 'add' functions, instead
of using the built-in flash() function, I simply unset
$this->params['data'] and display the empty form again with a success
message, to allow for more rapid data input:
//Save to DB and report on results
if ($this->Enhancement->save($this->params['data'])) {
$this->set('message', 'The new enhancement has been added.');
unset($this->params['data']);
$this->render();
}
For some reason, when I upgraded to version 1.0, this stopped working.
The fields won't unset, which is very confusing for users. I assume
this is because of some new pass-by-reference functionality, which I
understand is safer and better. But is there still a way to unset the
fields (data) and just display an empty form and a message after the
save? When I try using the redirect() function, it doesn't get the
messsage variable, and setAction() doesn't work either (times out). Any
help is greatly appreciated.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---