NAME

HTML::Widget::Element::RadioGroup - Radio Element grouping

SYNOPSIS

my $e = $widget->element( 'RadioGroup', 'foo', [qw/choice1 choice2/] );
$e->comment('(Required)');
$e->label('Foo'); # label for the whole thing
$e->values([qw/foo bar gorch/]);
$e->labels([qw/Fu Bur Garch/]); # defaults to ucfirst of values
$e->comments([qw/funky/]); # defaults to empty
$e->value("foo"); # the currently selected value

DESCRIPTION

RadioGroup Element.

METHODS

comment

Add a comment to this Element.

label

This label will be placed next to your Element.

size

The size of a select element determines whether it will be displayed as a dropdown (size = 1), or a multi-select list element. The default is 1.

options

A list of options in key => value format. Each key is the unique id of an option tag, and its corresponding value is the text displayed in the element.

selected

A list of keys (unique option ids) which will be pre-set to "selected".

$self->render( $widget, $value, $errors )

AUTHOR

Jess Robinson

Yuval Kogman

LICENSE

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.