HTML forms using Moose

Edit Package perl-HTML-FormHandler

*** Although documentation in this file provides some overview, it is
mainly intended for API documentation. See the
HTML::FormHandler::Manual::Intro manpage for a more detailed introduction.

HTML::FormHandler maintains a clean separation between form construction
and form rendering. It allows you to define your forms and fields in a
number of flexible ways. Although it provides renderers for HTML, you can
define custom renderers for any kind of presentation.

HTML::FormHandler allows you to define form fields and validators. It can
be used for both database and non-database forms, and will automatically
update or create rows in a database. It can be used to process structured
data that doesn't come from an HTML form.

One of its goals is to keep the controller/application program interface as
simple as possible, and to minimize the duplication of code. In most cases,
interfacing your controller to your form is only a few lines of code.

With FormHandler you'll never spend hours trying to figure out how to make
a simple HTML change that would take one minute by hand. Because you CAN do
it by hand. Or you can automate HTML generation as much as you want, with
template widgets or pure Perl rendering classes, and stay completely in
control of what, where, and how much is done automatically. You can define
custom renderers and display your rendered forms however you want.

You can split the pieces of your forms up into logical parts and compose
complete forms from FormHandler classes, roles, fields, collections of
validations, transformations and Moose type constraints. You can write
custom methods to process forms, add any attribute you like, use Moose
method modifiers. FormHandler forms are Perl classes, so there's a lot of
flexibility in what you can do.

HTML::FormHandler provides rendering through roles which are applied to
form and field classes (although there's no reason you couldn't write a
renderer as an external object either). There are currently two flavors:
all-in-one solutions like the HTML::FormHandler::Render::Simple manpage and
the HTML::FormHandler::Render::Table manpage that contain methods for
rendering field widget classes, and the the HTML::FormHandler::Widget
manpage roles, which are more atomic roles which are automatically applied
to fields and form if a 'render' method does not already exist. See the
HTML::FormHandler::Manual::Rendering manpage for more details. (And you can
easily use hand-build forms - FormHandler doesn't care.)

The typical application for FormHandler would be in a Catalyst,
DBIx::Class, Template Toolkit web application, but use is not limited to
that. FormHandler can be used in any Perl application.

More Formhandler documentation and a tutorial can be found in the manual at
the HTML::FormHandler::Manual manpage.

Refresh
Refresh
Source Files
Filename Size Changed
HTML-FormHandler-0.36003.tar.gz 0000207614 203 KB
perl-HTML-FormHandler.changes 0000004120 4.02 KB
perl-HTML-FormHandler.spec 0000009450 9.23 KB
Revision 5 (latest revision is 22)
Stephan Kulow's avatar Stephan Kulow (coolo) accepted request 105206 from Stephan Kulow's avatar Stephan Kulow (coolo) (revision 5)
- updated to 0.36003
   Bug rendering fields with hidden widget where label is rendered.
      Switch back to no wrapping of hidden fields.
   Fixed bug introduced in last release where rendering roles are overwritten
      by HTML::FormHandler::Render::Simple being applied on top.
   Add skip to t/config.t test for Config::Any
   Set language handle in t/render_errors.t test.
   Add two more widget tags: 'no_auto_fieldset' and 'no_compound_wrapper'
   Remove automatic addition of 'class="label"' to labels; if you want that
      behavior, add it in with form sub field_html_attributes.
   Add 'SKIP' to t/config.t test for Template.
   Update Captcha so it might actually work.
   Switch to using 'process_attrs' function to process attributes in rendering;
   *** There were lots of updates to rendering. You should verify your custom
       rendering, to make sure that nothing has broken. The '_add_html_attributes'
       method is no longer used.
   Add shorthand method for setting defaults in fields
   Add widget_tags 'label_no_colon' & 'wrapper_tag'
   Update and reorganize TT templates
   Add flags 'use_defaults_over_obj' & 'use_init_obj_over_item'
   Add 'num_extra' to Repeatable
   Update Turkish message file; add Float field
   Add lazy to 'html' attribute in Display field
   Add 'label_attr' and 'wrapper_attr' to Field
   Add 'Array' trait to field_name_space and widget_name_space
   Bug with selected/checked hash key in Multiple; switch to creating default
   Bug with repeatable contains; not using full name for accessor.
   Die if using HTML::FormHandler::Moose without HTML::FormHandler
   Field::TextArea extends Field::Text to reuse its validations (min/max length)
   Add is_html5 attribute to forms which causes forms to have the additional
Comments 0
openSUSE Build Service is sponsored by