Changes for version 0.40000
- There are many changes to rendering, many of them incompatible. These changes *will* break existing form rendering. You must check that your rendering works before upgrading. Making a copy of the old code (the widget and rendering roles) may be helpful (or use the compatibility libraries -- see below). I always prefer to maintain backward compatibility if possible, but a number of the improvements were not possible without breaking compatibility, so I did a lot of changes at once. Compatibility libraries are provided to help support rendering that relied on the earlier libriaries at: git://github.com/gshank/html-formhandler_pre-0.40_compat.git README at: https://github.com/gshank/html-formhandler_pre-0.40_compat/blob/master/README
- Add 'no_update' flag to allow skipping model_update. Remove 'deflate_to' flag; provide new inflation/deflation methods. see HTML::FormHandler::Manual::InflationDeflation New 'build_id_method' to provide different builder method for field IDs. 'auto_fieldset' and 'no_auto_fieldset' no longer used. No automatic fieldsets. Can be added with do_wrapper => 1 and a tag of wrapper_tag => 'fieldset' Localize the value of the reset button. Tests and fix for form 'validate_<field_name>' and 'default_<field_name>' method for repeatables fields. Change default radiogroup rendering to not use <br /> elements. Add back with tag radio_br_after => 1 Switch to using coderef for deflate_method; custom fields with deflate sub will need to be modified. Add block rendering (HTML::FormHandler::Blocks) Re-do code for default & validate method construction; now provides 'default_method' and 'validate_method' coderef setting Remove 'init_value_*' from Field (deprecated for years). Use Hash::Merge in merging update field info on creation Fix bug in copying tags to fields by cloning field definitions Switch to using name 'element_attr' in fields instead of 'html_attr' Put wrapper class 'hfh-repinst' on Repeatable Instances unless they already have a wrapper class Remove 'javascript' field attribute. Put into *_attr hashref. Automatically put 'error' on element and wrapper. Switch to having the 'class' as a separate attribute from the _attr collection. Use 'element_class', 'wrapper_class' & 'label_class' arrayrefs Switch to having widget names by default be camel case; provide convenience methods for templates - uwidget, uwrapper, twidget, twrapper.
- this change will affect existing template systems, if they use the $field->widget method to get the widget name. See example templates. and conversion methods 'ucc_widget' and 'cc_widget' in HTML::FormHandler::Render::Util
- Create t/share/templates/form/form_in_one.tt Switch default rendering of checkbox to have label wrap input. Checkboxes are complicated. See t/render/checkbox.t for various options. Add 'build_update_subfields' to 'update_fields' processing to allow moving more of rendering settings into a separate role Change form 'html_attr' to 'form_element_attr', and use builder Change interface of html_field_attributes to also return attr (instead of just in-place) Remove 'label_no_colon', make labels without colon the default. Add widget tag 'label_after'. Use "label_after => ': '" for old behavior Add widget tag 'label_tag'. Default 'label'. Widget_tags replaced with 'form_tags' in form and 'tags' in Field. takes builder 'build_form_tags' instead of default Repeatable elements get automatic 'div' wrapper Remove attribute 'auto_fieldset'; wrapping form is no longer a default; Add back with sub build_do_form_wrapper {1}, and form_tags => { wrapper_tag => 'fieldset' } Remove automatic wrapping of compounds. Enable wrapping with do_wrapper => 1 (there's also do_label => 1) Put form wrapper around form tag instead of inside wrapper_start and wrapper_end tags not used to skip wrapper; use do_wrapper => 0 The 'get_tag' method now returns '' instead of undef if tag doesn't exist.
Documentation
index of the manual
using HFH forms in Catalyst
FormHandler use recipes
FormHandler use recipes
form defaults documentation
FormHandler use recipes
brief documentation of available fields
inflation and deflation of field values
introduction to using FormHandler
concise reference
how to render with FormHandler
using templates
testing forms
how to use FormHandler with Catalyst
validating fields
Modules
HTML forms using Moose
used in Wizard
role to build field array
used in Wizard
base class for fields
Boolean select field
a true or false field
button field
captcha field with GD::SecurityImage
a checkbox field type
field consisting of subfields
a date field with formats
m/d/y date field
compound DateTime field
display only field
DateTime::Duration from HTML form values
validates email using Email::Valid
simple file field; does no processing
validate a float value
hidden field
accept integer from 0 to 23
input HTML in a textarea
integer range in select list
validate an integer value
input range from 0 to 59
US currency-like values
select list 1 to 12
select list 1 to 31
select list with month names
multiple select list
for nested elements of compound fields
base class for submit field
password field
password confirmation
positive integer field
primary key field
repeatable (array) field
used internally by repeatable fields
reset field
result class for fields
select list 0 to 59
select fields
submit field
text field
textarea input
file upload field
select list day of week strings
year selection list
internal role for form and compound fields
Experiment in loading form from config file
internationalization
German message translations
base message file
Hungarian message file
Japanese message file
Russian message file
Swedish message translations
Turkish message file
Ukrainian message file
internal code
internal hash merging
field_list and apply_list
default model base class
Class::DBI model class (non-functioning)
stub for Object model
to add FormHandler sugar
to add sugar to roles
used in Wizard
used by Wizard
used in Wizard
params handling
simple rendering role
render a form with a table layout
rendering utility
tt rendering
form result object
role with common code for form & field results
provides is_html method used in tests
generate and validate captchas
localization
types used internally in FormHandler
customized replacement for MooseX::Traits
Moose type constraints
validation role (internal)
role to apply widgets
base block renderer
block to format bare form element like bootstrap
button field rendering widget
button field rendering widget, using 'button tag
Captcha field rendering widget
HTML attributes field role
checkbox group field role
compound field widget
hidden field rendering widget
no rendering widget
password rendering widget
radio group rendering widget
repeatable field widget
reset field rendering widget
apply HTML attributes
allow setting options from options keys
select field rendering widget
submit field rendering widget
text field rendering widget
textarea rendering widget
update field rendering widget
set HTML attributes on the form tag
widget to render a form with divs
render a form with a table layout
sample bootstrap theme
common methods for widget wrappers
Twitter Bootstrap 2.0 field wrapper
fieldset field wrapper
wrapper that doesn't wrap
simple field wrapper
simple field wrapper
wrapper class for table layout
wrapper class for table layout that doesn't wrap compound fields
create a multi-page form