From a708c700f3f234ef5befddf544ecba30419b546a Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 5 Apr 2017 15:41:03 +0200 Subject: Adjust form fields. --- contact.cgi | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'contact.cgi') diff --git a/contact.cgi b/contact.cgi index 036782c..7256b5a 100755 --- a/contact.cgi +++ b/contact.cgi @@ -24,35 +24,49 @@ my $form = CGI::FormBuilder->new( title => 'Omni-presence contact form', method => 'POST', fields => [qw/ - comment - zip + name email + human + eyes + comment /], validate => { - zip => INT, email => $valid_email, _email => $valid_email, #fake check to silence warning of variable used only once }, required => [qw/ - comment + name + email + human /], messages => ':en_US', - submit => ['Send the info'], + submit => ['Submit', 'Submit via secure connection'], action => $webroot, #avoids loosing submitted values when redirected from other site ); $form->field( - name => 'zip', - label => 'Postal nummer', - size => 5, + name => 'name', ); $form->field( name => 'email', ); +$form->field( + name => 'human', + label => '', + options => ["I'm not a robot!"], + multiple => 0, + jsmessage => '- Sorry, no robots allowed!', +); +$form->field( + name => 'eyes', + label => 'eye color', + options => [qw(blue green other)], + type => 'select', +); $form->field( name => 'comment', type => 'textarea', - rows => 3, + rows => 5, ); my ($form_required_text) = $form->{opt}{messages}{form_required_text}; -- cgit v1.2.3