Krang::ElementClass::RadioGroup - radio group element class
# Create radio group from static elements
$class = pkg('ElementClass::RadioGroup')->new(
name => "alignment",
values => [ 'center', 'left', 'right' ],
labels => { center => "Center",
left => "Left",
right => "Right" },
columns => 2 );
# Create radio group from Krang list group
$class = pkg('ElementClass::RadioGroup')->new(
name => "thingies",
list_group => "article_thingies",
columns => 2 );
Provides a radio group element class.
All the normal Krang::ElementClass attributes are available, plus:
This can also be a code reference that will return an array reference.
This is really helpful when you don't know ahead of time what possible
values might be in the list, or they might change based on other actions.
This code reference will be called as a method in the element class with the
same arguments that are passed to element class's input_form().
values to display names.
This can also be a code reference that will return a hash reference.
This is really helpful when you don't know ahead of time what possible
values might be in the list, or they might change based on other actions.
This code reference will be called as a method in the element class with the
same arguments that are passed to element class's input_form().