my nickname on #zftalk is RUUN|Stalker

2007/9/27, debussy007 <[EMAIL PROTECTED]>:
>
>
> Hello,
>
> Yes we talked yesterday, since nobody was answering me, I went on #zftalk
> :-)
>
> Thank you for your reply and no, I didn't now about these form*() view
> helpers  !!
> I will have a look at it, thanks.
>
> Greetings from Belgium
> Matthew;
>
> (Who are you on #zftalk ?)
>
>
>
>
> Tobias Gies wrote:
> >
> > Hi!
> >
> > didn't we have this discussion on #zftalk yesterday evening?
> >
> > There is no solution to automagically put the values back into the form
> > (yet). You will have to use the request object to retreive all the
> values
> > from $_POST (using its method getPost('var')) and put them into your
> form
> > yourself. I don't think you will have too much extra PHP code for this
> > since
> > I assume you know of the existence of the form*() view helpers. If not,
> > have
> > a look here:
> >
> http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial
> >
> > Greetings form Germany (typo intended ;))
> > Tobias
> >
> > 2007/9/26, debussy007 <[EMAIL PROTECTED]>:
> >>
> >>
> >> 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.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/how-to-re-initialize-form-with-submitted-data-after-validation---tf4523104s16154.html#a12917269
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>

Reply via email to