HTML::FormFu::Element - Element Base Class
--- elements: - type: Text name: username constraints: - type: Required - type: Password name: password constraints: - type: Required - type: Equal others: repeat-password - type: Password name: repeat-password - type: Submit
Elements are the basic building block of all forms. Elements may be logical form-fields, blocks such as divs and fieldsets, non-blocks such as hrs and other special elements such as tables.
div
fieldset
hr
For simple, automatic handling of fieldsets see the "auto_fieldset" in HTML::FormFu setting.
See "deflators" in HTML::FormFu for details of Deflators.
See "FORM LOGIC AND VALIDATION" in HTML::FormFu for details of Filters, Constraints, Inflators, Validators and Transformers.
For field element, this value is used as the name attribute which the field's value is associated with.
name
For all elements, the "name" value can be useful for identifying and retrieving specific elements.
Return Value: boolean
Returns true or false depending on whether the element is a logical form-field.
true
false
This is used by "get_fields" in HTML::FormFu.
Arguments: $filename
Arguments: \@filenames
Populate an element using a config file:
--- elements: - type: Block load_config_file: 'elements.yml'
See "load_config_file" in HTML::FormFu for further details.
See "config_callback" in HTML::FormFu for details.
See "populate" in HTML::FormFu for details.
See "stash" in HTML::FormFu for details.
Returns the type argument originally used to create the element.
type
See "render_processed_value" in HTML::FormFu for details.
See "force_errors" in HTML::FormFu for details.
See specific element types for which tag attributes are added to.
Arguments: [%attributes]
Arguments: [\%attributes]
Return Value: $form
See "attributes" in HTML::FormFu for details.
"attrs" is an alias for "attributes".
See "attributes_xml" in HTML::FormFu for details.
"attrs_xml" is an alias for "attributes_xml".
See "add_attributes" in HTML::FormFu for details.
"add_attrs" is an alias for "add_attributes".
See "add_attributes_xml" in HTML::FormFu for details.
"add_attrs_xml" is an alias for "add_attributes_xml".
See "del_attributes" in HTML::FormFu for details.
"del_attrs" is an alias for "del_attributes".
See "del_attributes_xml" in HTML::FormFu for details.
"del_attrs_xml" is an alias for "del_attributes_xml".
The following methods are shortcuts for accessing "attributes"" in " keys.
Arguments: [$id]
Return Value: $id
Get or set the element's DOM id.
Default Value: none
This value identifies which template file should be used by "render" to render the element.
Arguments: $render
See "prepare_id" in HTML::FormFu::Element::_Field for details.
See "prepare_attrs" in HTML::FormFu::Element::_Field for details.
Return Value: $string
Returns the HTML::FormFu::Element or HTML::FormFu object that this element is attached to.
Returns the HTML::FormFu object that this element is attached to.
See "clone" in HTML::FormFu for details.
See "tt_args" in HTML::FormFu for details.
See "render_method" in HTML::FormFu for details.
The following are base classes for other elements, and generally needn't be used directly.
Carl Franks, cfranks@cpan.org
cfranks@cpan.org
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install HTML::FormFu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::FormFu
CPAN shell
perl -MCPAN -e shell install HTML::FormFu
For more information on module installation, please visit the detailed CPAN module installation guide.