print $query->radio_group(-name=>'group_name', -values=>['eenie','meenie','minie'], -default=>'meenie', -linebreak=>'true', -labels=>\%labels);
-or-
print $query->radio_group('group_name',['eenie','meenie','minie'], 'meenie','true',\%labels);
HTML3-COMPATIBLE BROWSERS ONLY:
print $query->radio_group(-name=>'group_name', -values=>['eenie','meenie','minie','moe'], -rows=2,-columns=>2);
radio_group
creates a set of logically-related radio buttons
(turning one member of the group on turns the others off)
radio_group
to return an
HTML3 compatible table containing the radio group
formatted with the specified number of rows and columns. You can provide
just the -columns parameter if you wish; radio_group will calculate the
correct number of rows for you.
To include row and column headings in the returned table, you can use the -rowheader and -colheader parameters. Both of these accept a pointer to an array of headings to use. The headings are just decorative. They don't reorganize the interpetation of the radio buttons -- they're still a single named unit.
$which_radio_button = $query->param('group_name');
The value returned by radio_group
is actually an array of
button elements. You can capture them and use them within tables, lists, or
in other creative ways:
@h = $query->radio_group(-name=>'group_name',-values=>\@values); &use_in_creative_way(@h);