NAME
HTML::FormHandlerX::Form::Contact - An HTML::FormHandler contact form.
VERSION
Version 0.04
SYNOPSIS
You know, that contact form you create day-in, day-out.
From a usability perspective in form design, it is advised to only ask for the minimal information you actually need, don't bombard a user with several fields if all you really need is one.
my
$form
= HTML::FormHandlerX::Form::Contact->new(
active
=> [
qw( name email subject message )
] );
$form
->process(
params
=> {
name
=>
$name
,
=>
,
subject
=>
$subject
,
message
=>
$message
,
} );
if
(
$form
->validated )
{
# do something...
}
METHODS
Fields
All fields will be rendered with a wrapper div with an id of field-<field-name>
.
If a field is activated, it will be a required field.
This supports the idea of keeping your forms as simple as possible, if you don't need it, don't ask for it.
name
$form
->field(
'name'
);
$form
->field(
'email'
);
Validation performed as-per Email::Valid.
telephone
$form
->field(
'telephone'
);
Validation ensures there's a number in this field, but nothing more complicated.
subject
$form
->field(
'subject'
);
message
$form
->field(
'message'
);
submit
$form
->field(
'submit'
);
The value of the submit button will be 'Send Message' by default.
Instance Methods
html_attributes
This method has been populated to ensure all fields in error have the error
CSS class assigned to the labels.
See HTML::FormHandler for more details.
AUTHOR
Rob Brown, <rob at intelcompute.com>
BUGS
Please report any bugs or feature requests to bug-html-formhandlerx-form-contact at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-FormHandlerX-Form-Contact. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc HTML::FormHandlerX::Form::Contact
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-FormHandlerX-Form-Contact
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
http://cpanratings.perl.org/d/HTML-FormHandlerX-Form-Contact
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2012 Rob Brown.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.