NAME
Form::Factory::Control::Checkbox - the checkbox control
VERSION
version 0.009
SYNOPSIS
has_control yes_no_box => (
control => 'checkbox',
options => {
true_value => 'Yes',
false_value => 'No',
is_true => 1,
},
);
DESCRIPTION
This represents a toggle button, typically displayed as a checkbox. This control implements Form::Factory::Control, Form::Factory::Control::Role::BooleanValue, Form::Factory::Control::Role::Labeled, Form::Factory::Control::Role::ScalarValue.
stashable_keys
The "is_true" attribute is stashed.
METHODS
default_isa
Boolean values default to Bool
.
current_value
Returns the "true_value" if "is_true" is true. Returns "false_value" otherwise.
If the control is neither true nor false, it returns undef
.
AUTHOR
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2009 Qubling Software LLC.
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.