Slovo::Plugin::TagHelpers - additional and advanced tag helpers
# slovo.conf plugins => [ 'TagHelpers', ... ]
Slovo::Plugin::TagHelpers extends Mojolicious::Plugin::TagHelpers and implements some additional helpers for form fields.
The following helpers are currently implemented.
<%= select_box published => [['for (p)review' => 1], ['no' => 0], ['Yes' => 2]], value => 2, label => 'Published'; %> <%= select_box colors => [(white green red blue yellow)], value => [qw(white green)], label => 'Favorite colors' multiple => undef %>
This is a wrapper for "select_field" in Mojolicious::Plugin::TagHelpers with additional optional attributes label and value. If label is not provided, the name of the field is used as label. If value is not provided, it is retreived from input $c->every_param($name) by the wrapped select_field. If value is provided it does $c->param($name => $attrs{value}). The generated tags are wrapped in a common span tag with class="field $name".
label
value
$c->every_param($name)
select_field
$c->param($name => $attrs{value})
span
class="field $name"
The usual method is implemented.
Calls the parent's register and registers additional helpers in Slovo application.
head1 SEE ALSO
Mojolicious::Plugin::TagHelpers
To install Slovo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Slovo
CPAN shell
perl -MCPAN -e shell install Slovo
For more information on module installation, please visit the detailed CPAN module installation guide.