1HTML::FormHandler::RendUesre:r:SCiomnptlrei(b3u)ted PerlHTDMoLc:u:mFeonrtmaHtainodnler::Render::Simple(3)
2
3
4

NAME

6       HTML::FormHandler::Render::Simple - simple rendering role
7

VERSION

9       version 0.40068
10

SYNOPSIS

12       This is a Moose role that is an example of a simple rendering routine
13       for HTML::FormHandler. It's here as an example of how to write a custom
14       renderer in one package, if you prefer that to using the widgets. It
15       won't always be updated with improvements by default, because it was
16       becoming a lot of work to update the rendering in multiple places.
17
18       For a 'MyApp::Form::Renderer' which you've created and modified, in
19       your Form class:
20
21          package MyApp::Form::Silly;
22          use Moose;
23          extends 'HTML::FormHandler::Model::DBIC';
24          with 'MyApp::Form::Renderers';
25
26       In a template:
27
28          [% form.render %]
29
30       The widgets are rendered with "$field->render"; rendering routines from
31       a class like this use "$form->render_field('field_name')" to render
32       individual fields:
33
34          [% form.render_field( 'title' ) %]
35

DESCRIPTION

37       This role provides HTML output routines for the 'widget' types defined
38       in the provided FormHandler fields. Each 'widget' name has a
39       'widget_$name' method here.
40
41       These widget routines output strings with HTML suitable for displaying
42       form fields.
43
44       The widget for a particular field can be defined in the form. You can
45       create additional widget routines in your form for custom widgets.
46
47       The fill-in-form values ('fif') are cleaned with the 'render_filter'
48       method of the base field class. You can change the filter to suit your
49       own needs: see HTML::FormHandler::Manual::Rendering
50
51   render
52       To render all the fields in a form in sorted order (using
53       'sorted_fields' method).
54
55   render_start, render_end
56       These use the methods in HTML::FormHandler::Widget::Form::Simple now.
57       If you want to customize them, copy them to your own package.
58
59       Will render the beginning and ending <form> tags and fieldsets. Allows
60       for easy splitting up of the form if you want to hand-render some of
61       the fields.
62
63          [% form.render_start %]
64          [% form.render_field('title') %]
65          <insert specially rendered field>
66          [% form.render_field('some_field') %]
67          [% form.render_end %]
68
69   render_field
70       Render a field passing in a field object or a field name
71
72          $form->render_field( $field )
73          $form->render_field( 'title' )
74
75   render_text
76       Output an HTML string for a text widget
77
78   render_password
79       Output an HTML string for a password widget
80
81   render_hidden
82       Output an HTML string for a hidden input widget
83
84   render_select
85       Output an HTML string for a 'select' widget, single or multiple
86
87   render_checkbox
88       Output an HTML string for a 'checkbox' widget
89
90   render_radio_group
91       Output an HTML string for a 'radio_group' selection widget.  This
92       widget should be for a field that inherits from 'Select', since it
93       requires the existence of an 'options' array.
94
95   render_textarea
96       Output an HTML string for a textarea widget
97
98   render_compound
99       Renders field with 'compound' widget
100
101   render_submit
102       Renders field with 'submit' widget
103

AUTHOR

105       FormHandler Contributors - see HTML::FormHandler
106
108       This software is copyright (c) 2017 by Gerda Shank.
109
110       This is free software; you can redistribute it and/or modify it under
111       the same terms as the Perl 5 programming language system itself.
112
113
114
115perl v5.32.0                      2020-07-2H8TML::FormHandler::Render::Simple(3)
Impressum