Acme-CPANModulesBundle-Import-PerlDancerAdvent-2018
view release on metacpan or search on metacpan
devdata/http_advent.perldancer.org_2018_21 view on Meta::CPAN
<label for="email">Email Address</label>
<input type="text" name="email" id="email" placeholder="someone@example.com">
<label for="subject">Subject</label>
<input type="text" name="subject" id="subject" placeholder="Nature of inquiry?">
<label for="message">Message</label>
<textarea name="message" id="message" placeholder="Message text"></textarea>
<label class="visuallyhidden">Don't fill this in!<input type="text" name="spam_one" tabindex="-1"></label>
<input type="hidden" name="spam_two">
<input type="submit">Send Request</input>
</form></pre>
<p>For the most part, it's a standard HTML form with a couple of notable exceptions:</p>
<pre class="prettyprint"><label class="visuallyhidden">Don't fill this in!<input type="text" name="spam_one" tabindex="-1"></label></pre>
<p>This uses a special CSS class, <code>visuallyhidden</code>, to make this form field invisible to the user. By giving it
a <code>tabindex="-1"</code>, we make sure the user cannot accidentally tab to the field. There are still a few ways that
field could accidentally get focus however, so we help the user here by giving it a label that says "Don't fill
this in!"</p>
<p>What does <code>visuallyhidden</code> look like?</p>
<pre class="prettyprint">.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
( run in 1.726 second using v1.01-cache-2.11-cpan-2398b32b56e )