Hornet | 12 Feb 16:12

Re: [FormBuilder] Default Values.

On 2/6/07, Nate Wiger <nwiger <at> gmail.com> wrote:
> 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
>

Nate,

Thanks for the info, that worked great!

Thanks again!

--

-- 

-Erik-
_______________________________________________
FBusers mailing list
FBusers <at> formbuilder.org
http://www.formbuilder.org/mailman/listinfo/fbusers


Gmane