GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  FORM::SENSIBLE::FIELD::TOGGLE (3)

.ds Aq ’

NAME

Form::Sensible::Field::Toggle - An on/off field

CONTENTS

SYNOPSIS



    use Form::Sensible::Field::Toggle;
   
    my $object = Form::Sensible::Field::Toggle->new(
                                                      on_value => 100,
                                                      off_value => 0
                                                    );



DESCRIPTION

The Toggle field type represents a simple on/off selector. A value is provided for both on and off states. A toggle can often be rendered in the same ways as a Select|Form::Sensible::Field::Select field type, as in most cases it can be treated as a select with only two options, on and off.

ATTRIBUTES

on_value The value to be used when the field is in the ’ON’ state.
off_value The value to be used when the field is in the ’OFF’ state.
on_label The label to be used when the field is in the ’ON’ state. Defaults to a ucfirst() version of the value.
off_label The label to be used when the field is in the ’OFF’ state. Defaults to a ucfirst() version of the value.

METHODS

get_additional_configuration Returns the attributes’ names and values as a hash ref.
options Returns an array ref of hashrefs composed of key/value pairs for the label and value of in the ’ON’ and ’OFF’ states.
accepts_multiple Returns 0, as this is a simple toggle.

AUTHOR

Jay Kuri - <jayk@cpan.org>

SPONSORED BY

Ionzero LLC. <http://ionzero.com/>

SEE ALSO

Form::Sensible

LICENSE

Copyright 2009 by Jay Kuri <jayk@cpan.org>

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 FORM::SENSIBLE::FIELD::TOGGLE (3) 2012-02-02

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.