6 Feb 18:11
Re: [FormBuilder] Default Values.
From: Nate Wiger <nwiger <at> gmail.com>
Subject: Re: [FormBuilder] Default Values.
Newsgroups: gmane.comp.lang.perl.modules.formbuilder
Date: 2007-02-06 17:11:40 GMT
Subject: Re: [FormBuilder] Default Values.
Newsgroups: gmane.comp.lang.perl.modules.formbuilder
Date: 2007-02-06 17:11:40 GMT
On 2/5/07, Hornet <hornetmadness <at> gmail.com> wrote:
> Hello All,
>
> my $notact=$h->{NotActive};
> delete $h->{NotActive};
>
> $form->field(name=>'NotActive', value=> $notact, options=>"Deactivate
> account");
Your options have to contain your value. For example:
$notact = 1; # inactive
$form->field(name => 'notact', label => 'Not Active', value => $notact,
options => [[1, 'Deactivate account']])
Or, if instead you wanted a radio group:
$form->field(name => 'notact', label => 'Activate Account?', value
=> $notact,
options => [[1, 'Yes'], [0, 'No']])
Either of these alternatives will display the 'Text' shown, but return
the value (ie, 1 or 0) to your script.
-Nate
_______________________________________________
FBusers mailing list
FBusers <at> formbuilder.org
http://www.formbuilder.org/mailman/listinfo/fbusers
RSS Feed