NAME

HTML::FormHandler::Blocks - used in Wizard

VERSION

version 0.40004

SYNOPSIS

This is a role which provides the ability to render your form in arbitrary 'blocks', instead of by fields.

package MyApp::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
with 'HTML::FormHandler::Blocks';

sub build_render_list {[ 'foo', 'fset' ]}
has_field 'foo';
has_field 'bar';
has_field 'nox';
has_block 'fset' => ( tag => 'fieldset', render_list => ['bar', 'nox'] );;
....
$form->render;

Blocks live in the HTML::FormHandler::Widget::Block:: namespace. The default, non-typed block is HTML::FormHandler::Widget::Block. Provide a type for custom blocks:

has_block 'my_block' => ( type => 'CustomBlock', render_list => [...] );

If you don't include this role, you can declare blocks with 'has_block', but nothing will be done with them and they won't be used in rendering.

AUTHOR

FormHandler Contributors - see HTML::FormHandler

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Gerda Shank.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.