HTML::FormWidgets

Create HTML form markup
Download

HTML::FormWidgets Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Peter Flanigan
  • Publisher web site:
  • http://search.cpan.org/~pjfl/

HTML::FormWidgets Tags


HTML::FormWidgets Description

Create HTML form markup HTML::FormWidgets is a Perl module that transforms a Perl data structure which defines one or more "widgets" into HTML or XHTML. Each widget is comprised of these optional components: a line or question number, a prompt string, a separator, an input field, additional field help, and Ajax field error string.Input fields are selected by the widget type attribute. A factory subclass implements the method that generates the HTML or XHTML for that input field type. Adding more widget types is straightforwardThis module is using the MooTools Javascript library to modify default browser behaviour.This module is used by CatalystX::Usul::View and as such its main use is as a form generator within a Catalyst application.Synopsis package CatalystX::Usul::View; use parent qw(Catalyst::View CatalystX::Usul); use HTML::FormWidgets; sub build_widgets { my ($self, $c, $sources, $config) = @_; my $s = $c->stash; my $data = []; $sources ||= []; $config ||= {}; for my $part (map { $s->{ $_ } } grep { $s->{ $_ } } @{ $sources }) { if (ref $part eq q(ARRAY) and $part->) { push @{ $data }, $_ for (@{ $part }); } else { push @{ $data }, $part } } $config->{assets } = $s->{assets}; $config->{base } = $c->req->base; $config->{content_type} = $s->{content_type}; $config->{fields } = $s->{fields} || {}; $config->{form } = $s->{form}; $config->{hide } = $s->{hidden}->{items}; $config->{messages } = $s->{messages}; $config->{pwidth } = $s->{pwidth}; $config->{root } = $c->config->{root}; $config->{static } = $s->{static}; $config->{swidth } = $s->{width} if ($s->{width}); $config->{templatedir } = $self->dynamic_templates; $config->{url } = $c->req->path; HTML::FormWidgets->build( $config, $data ); return $data; } Requirements: · Perl


HTML::FormWidgets Related Software