| Rose-HTMLx-Form-Field-Boolean documentation | Contained in the Rose-HTMLx-Form-Field-Boolean distribution. |
Rose::HTMLx::Form::Field::Boolean - extend RHTMLO RadioButtonGroup
# see Rose::HTML::Form::Field::RadioButtonGroup
This Field class is for boolean-type fields. The default labels are True and False, paired with values 1 and 0 respectively.
Only new or overridden methods are documented here.
Sets up the object.
Returns the radio button pair within a <div class="boolean_group"> tagset.
Peter Karman, <karman at cpan.org>
Please report any bugs or feature requests to
bug-rose-htmlx-form-field-boolean at rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Rose-HTMLx-Form-Field-Boolean.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Rose::HTMLx::Form::Field::Boolean
You can also look for information at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Rose-HTMLx-Form-Field-Boolean
The Minnesota Supercomputing Institute http://www.msi.umn.edu/
sponsored the development of this software.
Copyright 2007 by the Regents of the University of Minnesota.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Rose-HTMLx-Form-Field-Boolean documentation | Contained in the Rose-HTMLx-Form-Field-Boolean distribution. |
package Rose::HTMLx::Form::Field::Boolean; use warnings; use strict; use Rose::HTMLx::Form::Field::RadioButtonBoolean; use base qw( Rose::HTML::Form::Field::RadioButtonGroup ); our $VERSION = '0.03';
sub _item_class {'Rose::HTMLx::Form::Field::RadioButtonBoolean'}
sub init { my $self = shift; $self->SUPER::init(@_); # MUST do this first $self->xhtml_linebreak(''); $self->radio_buttons( [ '1', '0' ] ); $self->labels( { 1 => 'True', 0 => 'False' } ); return $self; }
sub xhtml_field { my ($self) = shift; my $sep = ( $self->linebreak ) ? $self->xhtml_linebreak : ' '; return '<div class="boolean_group">' . join( $sep, map { $_->xhtml_field } $self->items ) . '</div>'; }
1;