Package Info

perl-HTML-FormHandler


HTML forms using Moose


Development/Libraries/Perl

*** Although documentation in this file provides some overview, it is mainly intended for API documentation. See HTML::FormHandler::Manual::Intro for an introduction, with links to other documentation.

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 shouldn't have to 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, and 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 HTML::FormHandler::Render::Simple and HTML::FormHandler::Render::Table that contain methods for rendering field widget classes, and the HTML::FormHandler::Widget roles, which are more atomic roles which are automatically applied to fields and form. See HTML::FormHandler::Manual::Rendering for more details. (And you can easily use hand-built 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 HTML::FormHandler::Manual.


License: Artistic-1.0 or GPL-1.0+
URL: http://search.cpan.org/dist/HTML-FormHandler/

Categories

Releases

Package Version Update ID Released Package Hub Version Platforms Subpackages
0.40068-bp155.2.8 info GA Release 2023-05-17 15 SP5
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-HTML-FormHandler
0.40068-bp154.1.21 info GA Release 2022-05-09 15 SP4
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-HTML-FormHandler
0.40068-bp153.1.13 info GA Release 2021-03-06 15 SP3
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-HTML-FormHandler
0.40068-bp152.3.12 info GA Release 2020-04-17 15 SP2
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-HTML-FormHandler
0.40068-bp151.3.1 info GA Release 2019-07-17 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-HTML-FormHandler
0.40068-bp151.2.10 info GA Release 2019-05-18 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-HTML-FormHandler
0.40068-bp150.2.4 info GA Release 2018-07-30 15
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-HTML-FormHandler