RE: [PHP] How to make a form retain its info
| From: | Boget, Chris | Date: | Thu, 27 Jul 2000 19:49:55 +0000 |
| Subject: | RE: [PHP] How to make a form retain its info | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8648@lists.php.net to get a copy of this message | ||
> Interesting.. What do you trigger on to decide wether to
> "pre-load" the form?
> Or do you check each field, and fill or not depending on
> wether something was there?
With the FormClass I made mention of in my last post, it
has a validation function that checks and validates every
field. As for which fields to (re)display, I just display them
all. They will contain the values entered by the user previously
so there's no real reason not to show them.
> I like the idea of flagging the errored field, but this script
> seems to be getting fat pretty quickly.
I agree. Personally, I don't actually mark the field. I do,
however, tell the user exactly which field caused the error
and they, in turn, can fix those fields.
Chris