Contact Us

#### package My::Form::Contact; use HTML::FormHandler::Moose; use HTML::FormHandler::Types qw(NonEmptySimpleStr Printable Password); use namespace::autoclean; extends 'HTML::FormHandler'; has_field sender => ( label => 'Name', label_class => [qw(col-sm-2 control-label)], required => 1, apply => [NonEmptySimpleStr, Printable], element_class => [qw(form-control)], wrapper_class => [qw(form-group)], ); has_field email=> ( label => 'Email Address', label_class => [qw(col-sm-2 control-label)], required => 1, apply => [NonEmptySimpleStr, Printable], element_class => [qw(form-control)], wrapper_class => [qw(form-group)], ); has_field subject=> ( label => 'Subject', label_class => [qw(col-sm-2 control-label)], required => 1, apply => [NonEmptySimpleStr, Printable], element_class => [qw(form-control)], wrapper_class => [qw(form-group)], ); has_field message => ( label => 'Message', label_class => [qw(col-sm-2 control-label)], type => 'TextArea', required => 1, apply => [NonEmptySimpleStr, Printable], element_attr => { rows => 3, }, element_class => [qw(form-control)], wrapper_class => [qw(form-group)], ); has_field submit => ( label_class => [qw(col-sm-2 control-label)], type => 'Submit', value => 'Submit', element_class => [qw(btn btn-default)], wrapper_class => [qw(form-group)], ); # The
element class sub build_form_element_class {{ [qw(navbar-form navbar-left)] }} __PACKAGE__->meta->make_immutable(); 1;