I've had no luck locating any resource online for resolving my issue (which I feel is fairly easy), and thought I'd post it on here to see if anyone has input.
I'm trying to use the built-in data validation for submitting a form. The originating action, say, "manage_posts", displays the form to the user and lets them modify data for that post. When they submit, it sends the data to "activate_post". In the "activate_post" action, I call the if($this->Datavalue->set ($this->data) && $this->Datavalue->validates) function to test the data, and if that test fails I redirect back to "manage_posts"... The actual validation process seems to be functioning. It accepts valid data and redirects on invalid data. However, when it redirects to the previous action, it doesn't actually display the error message for that HTML element In the original form, I am in fact calling $this->Form->error ($datavalue, $error_msg) after generating the HTML element with $this- >Form->input(). Likewise, I have other actions throughout my application that use data validation and work correctly. However, they don't redirect to another action on failing validation. An example would be an action to "add_posts"... When the user submits data, it submits to itself, tests, and upon validation renders the same action/view. It seems that I'm only experiencing these problems when I redirect on the failure of a data validation. Any thoughts? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
