Yancy::Plugin::Form::Bootstrap4 - Generate forms using Bootstrap 4
version 1.068
use Mojolicious::Lite; plugin Yancy => { backend => 'pg://localhost/mysite', read_schema => 1, }; app->yancy->plugin( 'Form::Bootstrap4' ); # See Yancy::Controller::Yancy for routing app->routes->get( '/people/:id/edit' )->to( 'yancy#set', schema => 'people', template => 'edit_people', ); app->start; __DATA__ @@ edit_people.html.ep %= $c->yancy->form->form_for( 'people' );
This plugin generates forms using the Bootstrap 4.0.
For details on the helpers added by this plugin, see Yancy::Plugin::Form.
To override these templates, add your own at the designated path inside your app's templates/ directory.
templates/
This template surrounds the form to create the <form> element, list all the fields, and add a submit button. Also includes a CSRF token.
<form>
This template surrounds a single form field to add a <label> element, the appropriate input element(s), and the optional description.
<label>
This template is for single <input> elements and the attributes they need. This is used by field types string, number, integer, and string fields with formats email and date-time.
<input>
string
number
integer
email
date-time
This template is for single <textarea> elements and the attributes they need. This is used by fields with type string and format textarea.
<textarea>
textarea
This template is for single <select> elements and the attributes they need. This is used by fields with an enum property.
<select>
enum
This template displays a yes/no toggle used for fields of type boolean.
boolean
This template displays all read-only fields. This template must not include any kind of <input>, <select>, or other form fields.
Yancy::Plugin::Form, Yancy
Doug Bell <preaction@cpan.org>
This software is copyright (c) 2020 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Yancy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Yancy
CPAN shell
perl -MCPAN -e shell install Yancy
For more information on module installation, please visit the detailed CPAN module installation guide.