Re: HTML_QuickForm field required if not disabled
| From: | Justin Patrin | Date: | Thu, 16 Jun 2005 16:55:44 +0000 |
| Subject: | Re: HTML_QuickForm field required if not disabled | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19652@lists.php.net to get a copy of this message | ||
On 6/16/05, Tom Melendez <tmelendez@bascom.com> wrote:
> Hey folks,
>
> Been using quickform for quite a while, and have been pleased with it.
> However, I'm running into the following situation:
>
> I have fields on the screen that may be required if they are not
> disabled. (They are disabled based on other choices made on the screen
> beforehand) How do I tell quickform to "ignore" the require code?
>
Sounds kind of like the "soft rules" someone proposed a little while
ago. AFAIK there's no way to actually do this as the submitted form
has no information as to whether the form elements are disabled or
not. You'd have to use addFormRule to add a callback which checks the
other elements and refuses to validate if the required field is nto
filled out.
--
Justin Patrin