package Yancy::Plugin::Form; our $VERSION = '1.081'; # ABSTRACT: Generate form HTML using various UI libraries #pod =head1 SYNOPSIS #pod #pod use Mojolicious::Lite; #pod plugin Yancy => { #pod backend => 'pg://localhost/mysite', #pod read_schema => 1, #pod }; #pod app->yancy->plugin( 'Form::Bootstrap4' ); #pod app->routes->get( '/people/:id/edit' )->to( #pod 'yancy#set', #pod schema => 'people', #pod template => 'edit_people', #pod ); #pod app->start; #pod __DATA__ #pod @@ edit_people.html.ep #pod %= $c->yancy->form->form_for( 'people' ); #pod #pod =head1 DESCRIPTION #pod #pod The Form plugins generate forms from JSON schemas. Plugin and #pod application developers can use the form plugin API to make forms, and #pod then sites can load a specific form library plugin to match the style of #pod the site. #pod #pod B This API is B and will be considered stable in #pod Yancy version 2.0. Please report any issues you have or features you'd #pod like to see. Minor things may change before version 2.0, so be sure to #pod read the release changelog before upgrading. #pod #pod =head2 Available Libraries #pod #pod =over #pod #pod =item * L - Forms using L #pod #pod =back #pod #pod =head1 HELPERS #pod #pod All form plugins add the same helpers with the same arguments so that #pod applications can use the form plugin that matches their site's #pod appearance. Yancy plugin and app developers should use form plugins to #pod build forms so that users can easily customize the form's appearance. #pod #pod =head2 yancy->form->input #pod #pod my $html = $c->yancy->form->input( %args ); #pod %= $c->yancy->form->plugin( %args ); #pod #pod Create a form input. Usually one of a C<< >>, C<<