synjoo has asked for the wisdom of the Perl Monks concerning the following question:
and when I try to print back whats in the add_remove value I get nothingradio_group(-name=>['add_remove'], -values=>['Add','Remove'], -default=>'Add', -labels=>\%labels),p,
I thought that the add_remove instance of radio_buttone would just contain whatever value is checked by default or if it is changed. Can anyone explain what is going on? Or can post an example of a working radio button in CGI.pm I can prolly figure it out."Rule: ",em(param('add_remove')),p,
#!/usr/bin/perl -w use CGI qw/:standard/; print header, start_html('Service Request Form'), h1('Service Request Form'), start_form, "Name:<br>",textfield('name'),p, "Phone:<br>",textfield('phone'),p, "Date:<br>",textfield('date'),p, "Email:<br>",textfield('email'),p, "Add or Remove this rule", "<br>", radio_group(-name=>['add_remove'], -values=>['Add','Remove'], -default=>'Add', -labels=>\%labels),p, "Source:<br>",textfield('source'),p, "Destination:<br>",textfield('destination'),p, "Service:<br>",textfield('service'),p, "What do you want to happen to this traffic?", "<br>", radio_group(-name=>['action'], -values=>['Accept','Reject'], -default=>'Accept', -labels=>\%labels),p, "Please describe what you are trying to accomplish:<br>", textarea(-name=>'description', -rows=>10, -columns=>50),p, submit, end_form, hr,"\n"; if (param) { print "Name ",em(param('name')),p, "Phone Number: ",em(param('phone')),p, "Date: ",em(param('date')),p, "Email: ",em(param('email')),p, "Rule: ",em(param('add_remove')),p, "Source: ",em(param('source')),p, "Destination: ",em(param('destination')),p, "Service: ",em(param('service')),p, "Action: ",em(param('action')),p, "Description: ",em(param('description')),p, } print end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Please help with my CGI.pm misinterpritation
by fruiture (Curate) on Aug 09, 2002 at 16:09 UTC |