logo       

Re: [FormBuilder] Required Radio Type Disallows Zero: msg#00033

Subject: Re: [FormBuilder] Required Radio Type Disallows Zero
Bob,
Thanks that solved my problem perfectly.
Steve

On 10/30/06, Bob McClure Jr <bob@xxxxxxxxxxxx> wrote:
On Mon, Oct 30, 2006 at 09:17:01AM -0500, Steve Schwarz wrote:
> Hi,
> I'm wondering what I'm doing wrong.
> I had this field element and and as soon as I added "required=>1" to its
> definition it fails server side validation if I select zero (0) as its
> value. All other values don't cause a problem. Also server side validation
> succeeds if I remove "required=>1" Any ideas?
>    $form->field(name =>'persistence', type=>'radio', options=>[qw(-4 -3 -2
> -1 0 1 2 3 4), {99=>'N/A'}], required=>1);
>
> Thanks,
> Steve

I ran into this problem when I wanted to have the user select
height_inches (height_feet done separately).  Here is what works:

        $form->field(name => "height_inches",
                                 label => "",
                                 comment => "Inches",
                                 options => [ 0 .. 11 ],
                                 # This could be "0" ;
                                 # which will otherwise bust validation.
                                 validate => 'INT',
                                 );

So set the validation as 'INT' and a 0 entry won't bust the
validation.  Sometimes this is a required field and sometimes not, but
that is set separately.

Cheers,
--
Bob McClure, Jr.             Bobcat Open Systems, Inc.
bob@xxxxxxxxxxxx              http://www.bobcatos.com
"Where you go in the hereafter depends on what you were after here."
  - Thanks to Graffiti, 2 March 2004
_______________________________________________
FBusers mailing list
FBusers@xxxxxxxxxxxxxxx
http://www.formbuilder.org/mailman/listinfo/fbusers

_______________________________________________
FBusers mailing list
FBusers@xxxxxxxxxxxxxxx
http://www.formbuilder.org/mailman/listinfo/fbusers
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe