
HTML::Widget::Plugin::Radio - a widget for sets of radio buttons

$widget_factory->radio({
name => 'radio',
value => 'value_1',
options => [
[ value_1 => "Description 1" ],
[ value_2 => "Description 2" ],
[ value_2 => "Description 2", 'optional-elem-id' ],
],
});
This will emit roughly:
<input type='radio' name='radio' value='value_1' id='radio-value_1' checked='checked'></input> <label for='radio-value_1'>Description 2</label> <input type='radio' name='radio' value='value_2' id='radio-value_2'></input> <label for='radio-value_2'>Description 2</label> <input type='radio' name='radio' value='value_3' id='optional-elem-id'></input> <label for='optional-elem-id'>Description 2</label>

This plugin provides a radio button-set widget

provided_widgets This plugin provides the following widgets: radio
radio This method returns a set of radio buttons.
In addition to the generic HTML::Widget::Plugin attributes, the following are valid arguments:
If true, this option indicates that the select widget can't be changed by the user.
If this is given and true, an invalid value is ignored instead of throwing an exception.
This option must be a reference to an array of allowed values, each of which will get its own radio button.
If this argument is given, the option with this value will be pre-selected in the widget's initial state.
An exception will be thrown if more or less than one of the provided options has this value.
validate_value This method checks whether the given value option is valid. See "radio" for an explanation of its default rules.

Ricardo SIGNES <rjbs @ cpan.org>

Copyright (C) 2005-2007, Ricardo SIGNES. This is free software, released under the same terms as perl itself.