5 Feb 23:43
[FormBuilder] Default Values.
From: Hornet <hornetmadness <at> gmail.com>
Subject: [FormBuilder] Default Values.
Newsgroups: gmane.comp.lang.perl.modules.formbuilder
Date: 2007-02-05 22:44:32 GMT
Subject: [FormBuilder] Default Values.
Newsgroups: gmane.comp.lang.perl.modules.formbuilder
Date: 2007-02-05 22:44:32 GMT
Hello All,
Just want to start out by saying, this is a really great API and easy
to use. Which must be my problem. Below is the code I'm working with.
The problem I'm having is that I can't get the radio button or
checkbox to be either on or off. The $notact with either be 1 or 0,
yet nothing is checked. I thought I was doing what the documentation
was telling me. Can anyone see what I'm doing wrong?
sub edituser {
&noauth if !&admin;
&phead;
my $stmt="select Users.Username, Users.Password, Users.BmsCustId,
Users.Email, Users.FullName, Users.NotActive, Groups.Group as fGroup
from Users
left join Groups on Groups.pkey = Users.Group
where Users.pkey=$input{edituser}";
my $h=$dbh->selectrow_hashref($stmt);
print dumper_html($h);
my $notact=$h->{NotActive};
delete $h->{NotActive};
my $group=$dbh->selectall_arrayref("select Groups.Group from Groups");
$form = CGI::FormBuilder->new(
fields =>$h,
smartness => 2,
);
$form->field(name=>'NotActive', value=> $notact, options=>"Deactivate
(Continue reading)
RSS Feed