NAME

HTML::Widget::Result - Result Class

SYNOPSIS

see HTML::Widget

DESCRIPTION

Result Class.

METHODS

$self->action($action)

Contains the form action.

$self->as_xml

Returns xml.

$self->container($tag)

Contains the container tag.

$self->enctype($enctype)

Contains the form encoding type.

$self->error( $name, $type ) =head2 $self->errors( $name, $type )

Returns a list of HTML::Widget::Error objects.

my @errors = $form->errors;
my @errors = $form->errors('foo');
my @errors = $form->errors( 'foo', 'ASCII' );

$self->element($name) =head2 $self->elements($name)

Returns a HTML::Widget::Container object for element or a list of HTML::Widget::Container objects for form.

my @form = $f->element;
my $age  = $f->element('age');

$self->empty_errors(1)

Create spans for errors even when there's no errors.. (For AJAX validation validation)

$self->has_error($name); =head2 $self->has_errors($name); =head2 $self->have_errors($name);

Returns a list of element names.

my @names = $form->has_errors;
my $error = $form->has_errors($name);

$self->id($id)

Contains the widget id.

$self->legend($legend)

Contains the legend.

$self->method($method)

Contains the form method.

$self->param($name)

Returns valid parameters with a CGI.pm-compatible param method. (read-only)

$self->params($params) =head2 $self->parameters($params)

Returns validated params as hashref.

$self->subcontainer($tag)

Contains the subcontainer tag.

$self->strict($strict)

Only consider parameters that pass at least one constraint valid.

$self->valid

Returns a list of element names.

my @names = $form->valid;
my $valid = $form->valid($name);

AUTHOR

Sebastian Riedel, sri@oook.de

LICENSE

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.