HTML::Shakan::Field::Choice - choice field
use HTML::Shakan::Field::Choice; HTML::Shakan::Field::Choice->new( name => 'pref', choices => [ #value=> label tokyo => 'tokyo', osaka => 'osaka', kyoto => 'kyoto', ], ); # or shortcut use HTML::Shakan::Fields; ChoiceField( name => 'pref', choices => [ tokyo => 'tokyo', osaka => 'osaka', kyoto => 'kyoto', ], ); # if you want radio button ChoiceField( name => 'pref', choices => [ tokyo => 'tokyo', osaka => 'osaka', kyoto => 'kyoto', ], widget => 'radio', ); # if you want checkbox ChoiceField( name => 'pref', choices => [ tokyo => 'tokyo', osaka => 'osaka', kyoto => 'kyoto', ], widget => 'checkbox', );
Choice field implementation. This field may show in HTML as <select></select> tag.
<select></select>
HTML::Shakan::Field
HTML::Shakan
To install HTML::Shakan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Shakan
CPAN shell
perl -MCPAN -e shell install HTML::Shakan
For more information on module installation, please visit the detailed CPAN module installation guide.