Re: [PHPLIB] OOH Forms - extending for editing or deleting data From: Eric Ries (eries <email protected>)
Date: 12/17/99

I do this (if I understand correctly) by calling validate() twice - once
before anything drawn and then again as part of show_element() for each
element. Not elegant, but if you were to cache the results of validate()
somewhere it wouldn't be bad at all.

Eric

At 12:31 PM 12/14/99 +0100, Massimiliano Masserelli wrote:
>On Mon, Dec 13, 1999 at 07:57:08PM +0100, Kristian Köhntopp wrote:
>
> >> Couldn't you validate the elements one by one at the very moment
> >> you're rendering them?
> KK> This is to late. Assume you have a form submission to a page, then
> KK> the sequence of action is:
> KK> a) validate all form elements and generate possible error messages b)
> KK> if the form validates ok (there are no error messages), b1) change
> KK> the database or whatever the form is supposed to do with all the data
> KK> collected b2) display result of transaction c) if the form does not
> KK> validate (there are error messages), redraw the form, inserting the
> KK> error messages in the appropriate places.
> KK> The decision what to display can only be made after form validation,
> KK> so validation has to be completed before anything is actually drawn
> KK> on screen.
>
>Yes, I understand that. We were talking about "multiple" error messages,
>but I wasn't able to explain my point. You can use the "standard"
>oohforms validator to validate the form. If any of the fields is
>invalid, you then call each element "validator" to find which elements
>are wrong and generate the proper error message. I think this could be
>done at rendering time.
>
>Bye.
>--
> Massimiliano Masserelli | URL: http://www.interim.it/
> Internet Images S.r.l. | Tel: +39-051-3390671
> vicolo Viazzolo, 3 | Fax: +39-051-557890
> 40124 - Bologna - Italy |
>---------------------------------------------------------------------------
>----
>I'm totally DESPONDENT over the LIBYAN situation and the price of CHICKEN ...
>-
>PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
>To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
>the body, not the subject, of your message.

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.