NAME

HTML::FormHandler::Fields - role to build field array

SYNOPSIS

These are internal methods to build the field array. Probably not useful to users.

fields

The field definitions as built from the field_list and the 'has_field' declarations. This is a MooseX::AttributeHelpers::Collection::Array, and provides clear_fields, add_field, remove_last_field, num_fields, has_fields, and set_field_at methods.

build_fields

This parses the field lists and creates the individual field objects. It calls the make_field() method for each field. This is called by the BUILD method. Users don't need to call this.

make_field

$field = $form->make_field( $name, $type );

Maps the field type to a field class, creates a field object and and returns it.

The "$name" parameter is the field's name (e.g. first_name, age).

The second parameter is either a scalar which is the field's type string, or a hashref with a 'type' key containing the field's type.

field_index

Convenience function for use with 'set_field_at'.

field

sorted_fields

Calls fields and returns them in sorted order by their "order" value. Non-sorted fields are retrieved with 'fields'.

fields_validate