Jess Robinson > HTML-Widget-1.05 > HTML::Widget::Result

Download:
HTML-Widget-1.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  3
View/Report Bugs
Source   Latest Release: HTML-Widget-1.11

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 )

$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)

$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);

$self->has_errors($name);

$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)

$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);

add_valid <key>,<value>

Adds another valid value to the hash.

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.

syntax highlighting: