N
Nerfherder
I would like to be able to deselect a radio_group when the user selects
to clear the form.
#!/usr/local/bin/perl
use CGI qwstandard);
$query = new CGI;
my $policy = "blank";
if( param( 'action' )) {
if( param( 'action' ) eq "Clear" ) {
$policy = "blank";
}
}
print header(), start_html(), start_form();
print radio_group( -NAME=>'level',
-VALUES=>[ 'Personal', 'Complete' ],
-LINEBREAK=>'true',
-DEFAULT=>$policy );
print br, $policy, br;
print br, submit( -NAME=>'action',
-VALUE=>'Clear' ), " ";
print end_form(), end_html();
to clear the form.
#!/usr/local/bin/perl
use CGI qwstandard);
$query = new CGI;
my $policy = "blank";
if( param( 'action' )) {
if( param( 'action' ) eq "Clear" ) {
$policy = "blank";
}
}
print header(), start_html(), start_form();
print radio_group( -NAME=>'level',
-VALUES=>[ 'Personal', 'Complete' ],
-LINEBREAK=>'true',
-DEFAULT=>$policy );
print br, $policy, br;
print br, submit( -NAME=>'action',
-VALUE=>'Clear' ), " ";
print end_form(), end_html();