summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-04-05 15:41:03 +0200
committerJonas Smedegaard <dr@jones.dk>2017-04-05 15:41:03 +0200
commita708c700f3f234ef5befddf544ecba30419b546a (patch)
tree720ad50614a56c6bcede62ef3872b8a4639bb786
parente72a4460747f017bbf4834cb0b9ec53af23c38a8 (diff)
Adjust form fields.
-rwxr-xr-xcontact.cgi32
1 files changed, 23 insertions, 9 deletions
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};