Krang::ElementClass::CheckBoxGroup - checkbox group element class
$class = pkg('ElementClass::CheckBoxGroup')->new(
name => "alignment",
columns => 3,
values => [ 'center', 'left', 'right' ],
labels => { center => "Centered",
left => "Left Aligned",
right => "Right Aligned" },
# use either values/labels OR list_group
list_group => 'group_name',
defaults => ['center'],
);
Provides a checkbox 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().
[] Opt A [] Opt E [] Opt B [] Opt F [] Opt C [] Opt G [] Opt D
Default is columns == 1.