Form-Sensible

 view release on metacpan or  search on metacpan

lib/Form/Sensible/Renderer/HTML/RenderedForm.pm  view on Meta::CPAN

Render hints provide information on how to render certain aspects of the form
or field. The usage depends upon the field type in question. The information
is passed through to the field-specific templates as 'render_hints' during
processing.

A hint that is specific to the HTML renderer is C<stash_vars>, this should be
a hash and will be passed to the templates as they are rendered.

    {
        stash_vars => {
            user_prefs => $user_prefs
        }
    }

For example in the this case, C<$user_prefs> could be accessed in any
of the templates (form_start.tt, text.tt etc) as C<[% user_prefs %]>.

Another is C<field_wrapper> which should be the name of a template to act
as a wrapper for each individual field template. This can be useful if each
field has common HTML and only the actual field element changes. For example
in this case:

    {
        field_wrapper => 'field_wrapper_file'
    }



( run in 0.983 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )