Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: cgi script does not pull the values from the radio buttons

by Jazz (Curate)
on Sep 08, 2001 at 04:11 UTC ( [id://111089]=note: print w/replies, xml ) Need Help??


in reply to cgi script does not pull the values from the radio buttons

Actually, it looks like the html code is off.

<input type=radio name="dashboard" id="dashboard2" value="">2

Here, if someone clicks this button, the value assigned is blank (value=""). It seems like you're using id the way you really wanted to use value...

<input type="radio" name="dashboard" value="dashboard1">1 <input type="radio" name="dashboard" value="dashboard2">2 <input type="radio" name="dashboard" value="dashboard3">3 <input type="radio" name="dashboard" value="dashboard4">4 <input type="radio" name="dashboard" value="dashboard5">5
Is there a reason why you're not using CGI.pm to generate your form code?

my %radio_field_values = ( 'dashboard1' => 1, 'dashboard2' => 2, 'dashboard3' => 3, 'dashboard4' => 4, 'dashboard5' => 5, ); print radio_group( -name => 'dashboard', -labels => \%radio_field_values, -values => [ keys %radio_field_values ], );

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://111089]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found