Dear list,
Is it possible to redirect to a different URL if the form is invalid?
The new URL should contain the submitted form with the
user-provided values and error-messages.
I tried the following code, but it failed; the displayed form is fresh.
if (!$form->isValid($this->getRequest()->getPost())) {
// Failed validation; redisplay form
$this->_helper->_redirector->setCode(303)
->setExit(true)
->setGoto('#error-msg');
return;
}
How can keep the form's data and its state
after the redirection (without using Sessions)?
Thank you in advance,
Behzad