| HTML-DisableForm documentation | view source | Contained in the HTML-DisableForm distribution. |
HTML::DisableForm - Manipulate disabled/readonly HTML Forms
use HTML::DisableForm;
my $df = new HTML::DisableForm;
my $output = $dif->disable_form(scalarref => \$html);
This module automatically makes form controlls disable/readonly.
Creates a new HTML::DisableForm object
$df = new HTML::DisableForm
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/],
);
This method equals to disable_form() with a readonly flag.
More tests.
Naoya Ito <naoya@bloghackers.net>
Copyright (c) 2006, Naoya Ito <naoya@bloghackers.net>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
| HTML-DisableForm documentation | view source | Contained in the HTML-DisableForm distribution. |