HTML::DisableForm - Manipulate disabled/readonly HTML Forms


HTML-DisableForm documentation  | view source Contained in the HTML-DisableForm distribution.

Index


NAME

Top

HTML::DisableForm - Manipulate disabled/readonly HTML Forms

SYNOPSIS

Top

    use HTML::DisableForm;

    my $df = new HTML::DisableForm;
    my $output = $dif->disable_form(scalarref => \$html);

DESCRIPTION

Top

This module automatically makes form controlls disable/readonly.

METHODS

Top

new

Creates a new HTML::DisableForm object

  $df = new HTML::DisableForm

disable_form

Returns HTML with disabled forms. This method can take some type of argument for a HTML document.

  $output = $df->disable_form(scalarref => \$html);

  $output = $df->disable_form(file => "/path/to/document.html");

  $output = $df->disable_form(arrayref => \@html);

Specify readonly flag if you want to makes it readonly instead of disable.

  $output = $df->disable_form(arrayref => \@html);

Suppose you have multiple forms in a html and among them there is only one form you want to disable, specify target.

   $output = $df->disable_form(
      scalarref => \$html,
      target    => 'foo',
   );

If there are some forms you want to ignore, specify their names as ignore_forms.

   $output = $df->disable_form(
      scalarref    => \$html,
      ignore_forms => [qw/foo bar/],
   );

You can also ignore fields what you want.

   $output = $df->disable_form(
      scalarref    => \$html,
      ignore_fields => [qw/name password/],
   );

readonly_form

This method equals to disable_form() with a readonly flag.

TODO

Top

More tests.

AUTHOR

Top

Naoya Ito <naoya@bloghackers.net>

LICENCE AND COPYRIGHT

Top


HTML-DisableForm documentation  | view source Contained in the HTML-DisableForm distribution.