HTML::FormHandlerX::Form::Contact - An HTML::FormHandler contact form.
Version 0.04
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.
use HTML::FormHandlerX::Form::Contact; my $form = HTML::FormHandlerX::Form::Contact->new( active => [ qw( name email subject message ) ] ); $form->process( params => { name => $name, email => $email, subject => $subject, message => $message, } ); if ( $form->validated ) { # do something... }
All fields will be rendered with a wrapper div with an id of field-<field-name>.
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.
$form->field('name');
$form->field('email');
Validation performed as-per Email::Valid.
$form->field('telephone');
Validation ensures there's a number in this field, but nothing more complicated.
$form->field('subject');
$form->field('message');
$form->field('submit');
The value of the submit button will be 'Send Message' by default.
This method has been populated to ensure all fields in error have the error CSS class assigned to the labels.
error
See HTML::FormHandler for more details.
Rob Brown, <rob at intelcompute.com>
<rob at intelcompute.com>
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.
bug-html-formhandlerx-form-contact at rt.cpan.org
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
http://annocpan.org/dist/HTML-FormHandlerX-Form-Contact
CPAN Ratings
http://cpanratings.perl.org/d/HTML-FormHandlerX-Form-Contact
Search CPAN
http://search.cpan.org/dist/HTML-FormHandlerX-Form-Contact/
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.
To install HTML::FormHandlerX::Form::Contact, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::FormHandlerX::Form::Contact
CPAN shell
perl -MCPAN -e shell install HTML::FormHandlerX::Form::Contact
For more information on module installation, please visit the detailed CPAN module installation guide.