Re: Required items

From: Date: Fri, 18 Mar 2005 22:12:12 +0000
Subject: Re: Required items
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18145@lists.php.net to get a copy of this message
On Fri, 18 Mar 2005 13:49:17 -0800, Rob Barreca <rob@electronicinsight.com> wrote: > Hey Justin, it's Rob-Roy from IRC. When I'm using FormBuilder why are all > the fields required then? Ah, you didn't say you were using FormBuilder. By default FormBuilder makes all NOT NULL fields required. If you remove the NOT NULL constraint from the columns and regenerate your schema this will go away. There's also a feature in CVS for FormBuilder called excludeFromAutoRules. This can be set to an array of element names or '__ALL__', which excludes all elements from auto-rules. > > Justin Patrin wrote: > On Fri, 18 Mar 2005 12:25:26 -0800, Rob Barreca <rob@electronicinsight.com> > wrote: > I know you can use addRule to require items with QuickForm, but is there a > > place to set the default as optional? I have a lot of records with optional > > data and just want to require a few records. > > Huh? By default QuickForm does > not make elements required, therefore they're optional. You have to addRule > to make them required. -- Justin Patrin

« previous php.pear.general (#18145) next »