Hello all,
When a user submit a form,
I do some validations server side.
e.g. check wether the username specified is not already taken.
If there is an error, I forward again to the page displaying the form.
But the problem if I do a simpel forward,
is that the user has to re-introduce all the fields again !
Is there a simple way to insert the introduced values back in the form ?
Thank you.
Sample code
-----------
$partners = new Partners();
$where = $partners->getAdapter()->quoteInto('username = ?', $username);
$row = $partners->fetchRow($where);
if ($row != NULL) {
$this->view->errorRegistration = "Username " . $username . " is already
in
use.";
$this->_forward('index');
return;
}
--
View this message in context:
http://www.nabble.com/how-to-re-initialize-form-with-submitted-data-after-validation---tf4523104s16154.html#a12903485
Sent from the Zend Framework mailing list archive at Nabble.com.