SlideShare a Scribd company logo
1 of 130
Download to read offline
FALLING IN LOVE WITH
FORMS
Aaron Gustafson
@AaronGustafson
slideshare.net/AaronGustafson
Forms suck.
They are incredibly
tedious to create.
They are undeniably

annoying to fill in.
They can be
frustrating to test.
They require logic.
Forms suck.
Forms suck.
can
Forms suck.
don’t have to
Forms suck.
can
a lot less
Forms can be…
easy to build
predictable
effortless to use
and accessible
It’s all in how you
look at them.
HELPFUL HINT
Break large,

complex forms into
smaller, simpler,
reusable patterns
Code Examples
http://is.gd/ag_forms
How about a

common example?
Let’s look

at a contact form.
webstandardssherpa.com/contact
webstandardssherpa.com/contact
FALLING IN LOVE WITH FORMS
Pattern 1: Label & Field
Your Name
<input type=“text” name=“full_name”>
FALLING IN LOVE WITH FORMS
Pattern 1: Label & Field
Your Name
<input name=“full_name”>
FALLING IN LOVE WITH FORMS
Pattern 1: Label & Field
Your Name
<input name=“full_name”/>
FALLING IN LOVE WITH FORMS
Pattern 1: Label & Field
Your Name
<input name=“full_name”>
FALLING IN LOVE WITH FORMS
Pattern 1: Label & Field
<label>Your Name</label>
<input name=“full_name”>
FALLING IN LOVE WITH FORMS
Pattern 1: Label & Field
<label for=“full_name”>Your Name</label>
<input id=“full_name” name=“full_name”>
FALLING IN LOVE WITH FORMS
Pattern 1: Label & Field
<label for=“full_name”>Your Name</label>
<input id=“full_name” name=“full_name” required>
FALLING IN LOVE WITH FORMS
Pattern 2: Label, Field & Note
<label for=“email”>Your Email</label>
<input id=“email” name=“email” required>
We will only use your email address to respond to your message.
FALLING IN LOVE WITH FORMS
Pattern 2: Label, Field & Note
<label for=“email”>Your Email</label>
<input id=“email” name=“email” required>
We will only use your email address to respond to your message.
FALLING IN LOVE WITH FORMS
Pattern 2: Label, Field & Note
<label for=“email”>Your Email</label>
<input id=“email” name=“email” required>
We will only use your email address to respond to your message.
FALLING IN LOVE WITH FORMS
Pattern 2: Label, Field & Note
<label for=“email”>Your Email</label>
<input type=“email” id=“email” name=“email” required>
We will only use your email address to respond to your message.
FALLING IN LOVE WITH FORMS
Pattern 2: Label, Field & Note
<label for=“email”>Your Email</label>
<input type=“email” id=“email” name=“email” required>
We will only use your email address to respond to your message.
FALLING IN LOVE WITH FORMS
Pattern 2: Label, Field & Note
<label for=“email”>Your Email</label>
<input type=“email” id=“email” name=“email” required>
We will only use your email address to respond to your message.
Browsers ignore
what they don’t
understand
Progressive
Enhancement
SHAMELESS PLUG!
Crafting Rich Experienceswith Progressive Enhancement
SECOND EDITION
ADAPTIVEWEBDESIGN
by Aaron GustafsonForeword by Jeremy Keith
Read Free at
http://is.gd/awd1st
Available

Dec 6th
FALLING IN LOVE WITH FORMS
Pattern 2: Label, Field & Note
<label for=“email”>Your Email</label>
<input type=“email” id=“email” name=“email” required>
<em>
We will only use your email address to respond to your message.
</em>
FALLING IN LOVE WITH FORMS
Pattern 2: Label, Field & Note
<label for=“email”>Your Email</label>
<input type=“email” id=“email” name=“email” required>
<em class=“note”>
We will only use your email address to respond to your message.
</em>
FALLING IN LOVE WITH FORMS
Pattern 2: Label, Field & Note
<label for=“email”>Your Email</label>
<input type=“email” id=“email” name=“email” required
aria-describedby=“email-note”>
<em class=“note” id=“email-note”>
We will only use your email address to respond to your message.
</em>
FALLING IN LOVE WITH FORMS
Rinse & Repeat
<label for=“subject”>Purpose of Your Message</label>
<select id="subject" name="subject">
<option>Question/Comment</option>
<option>Article Error</option>
<option>Website Bug Report</option>
<option>Ask the Sherpas a question</option>
</select>
FALLING IN LOVE WITH FORMS
Rinse & Repeat
<label for=“message”>Your Message</label>
<textarea id="message" name="message"></textarea>
FALLING IN LOVE WITH FORMS
Buttons
<input type=“submit” value=“Send My Message”>
FALLING IN LOVE WITH FORMS
Buttons
<button type=“submit”>Send My Message</button>
HELPFUL HINT
A button element
can contain pretty
much anything
(within reason)
That new email field
looks cool, can we
see more of that
fancy HTML5 stuff?
FALLING IN LOVE WITH FORMS
Requesting URLs
<label for=“url”>URL</label>
<input type=“url” id=“url” name=“url” required
aria-describedby=“url-note”
>
<em class=“note” id=“url-note”>
Please provide the URL for the specific page that includes the area
you want reviewed.
</em>
FALLING IN LOVE WITH FORMS
Requesting URLs
<label for=“url”>URL</label>
<input type=“url” id=“url” name=“url” required
aria-describedby=“url-note”
>
<em class=“note” id=“url-note”>
Please provide the URL for the specific page that includes the area
you want reviewed.
</em>
FALLING IN LOVE WITH FORMS
Requesting URLs
<label for=“url”>URL</label>
<input type=“url” id=“url” name=“url” required
aria-describedby=“url-note”
>
<em class=“note” id=“url-note”>
Please provide the URL for the specific page that includes the area
you want reviewed.
</em>
FALLING IN LOVE WITH FORMS
Requesting URLs
<label for=“url”>URL</label>
<input type=“url” id=“url” name=“url” required
aria-describedby=“url-note”
>
<em class=“note” id=“url-note”>
Please provide the URL for the specific page that includes the area
you want reviewed.
</em>
FALLING IN LOVE WITH FORMS
Providing hints
<label for=“url”>URL</label>
<input type=“url” id=“url” name=“url” required
aria-describedby=“url-note”
placeholder=“http://www.yoursite.com/specific-page#anchored-section”
>
<em class=“note” id=“url-note”>
Please provide the URL for the specific page that includes the area
you want reviewed.
</em>
HELPFUL HINT
Placeholders are just
that: placeholders
for actual content.
They are not labels!
FALLING IN LOVE WITH FORMS
Providing hints
<label for=“url”>URL</label>
<input type=“url” id=“url” name=“url” required
aria-describedby=“url-note”
placeholder=“http://www.yoursite.com/specific-page#anchored-section”
>
<em class=“note” id=“url-note”>
Please provide the URL for the specific page that includes the area
you want reviewed.
</em>
FALLING IN LOVE WITH FORMS
Requesting phone numbers
<label for="preferred_phone">Preferred Phone</label>
<input type="tel" id="preferred_phone" name=“preferred_phone”
placeholder="ex. 123-456-7890”
>
FALLING IN LOVE WITH FORMS
Requesting phone numbers
<label for="preferred_phone">Preferred Phone</label>
<input type="tel" id="preferred_phone" name=“preferred_phone”
placeholder="ex. 123-456-7890”
>
FALLING IN LOVE WITH FORMS
Requesting phone numbers
<label for="preferred_phone">Preferred Phone</label>
<input type="tel" id="preferred_phone" name=“preferred_phone”
placeholder="ex. 123-456-7890”
>
FALLING IN LOVE WITH FORMS
Requesting numbers
<label for="test">What is 1 + 1?</label>
<input id="test" type=“number" name="test">
FALLING IN LOVE WITH FORMS
Requesting numbers
<label for=“volume">How Loud is Spinal Tap?</label>
<input id="volume" type=“range" name=“volume”
min=“0” max=“11” step=“1”
>
FALLING IN LOVE WITH FORMS
Requesting numbers
<label for="test">What is 1 + 1?</label>
<input id="test" type=“number" name=“test”
pattern=“[0-9]*”
min=“0” max=“9”
>
FALLING IN LOVE WITH FORMS
Requesting dates & times
<label for="preferred_dates">Preferred Date to Visit</label>
<input id="preferred_dates" type="date" name=“preferred_dates"
required
>
FALLING IN LOVE WITH FORMS
Requesting dates & times
<label for="preferred_dates">Preferred Date to Visit</label>
<input id="preferred_dates" type="date" name=“preferred_dates"
required
>
FALLING IN LOVE WITH FORMS
Requesting dates & times
<label for="preferred_dates">Preferred Date to Visit</label>
<input id="preferred_dates" type="date" name=“preferred_dates"
required
>
FALLING IN LOVE WITH FORMS
Requesting dates & times
<label for="preferred_dates">Preferred Date to Visit</label>
<input id="preferred_dates" type="date" name=“preferred_dates"
required
min=“2014-09-10” max=“2014-12-19”
>
FALLING IN LOVE WITH FORMS
Requesting dates & times
<label for="preferred_dates">Preferred Date to Visit</label>
<input id="preferred_dates" type="date" name=“preferred_dates"
required
min=“2014-09-10” max=“2014-12-19”
>
FALLING IN LOVE WITH FORMS
Requesting dates & times
<label for="requested_tour_time">Tour Time Requested</label>
<input id="requested_tour_time" type="time" name=“requested_tour_time">
FALLING IN LOVE WITH FORMS
Requesting dates & times
<label for="requested_tour_time">Tour Time Requested</label>
<input id="requested_tour_time" type="time" name=“requested_tour_time">
FALLING IN LOVE WITH FORMS
Mentalism
<label for="state">State</label>
<input id="state" name="state" list="states">
<datalist id="states">
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<!-- options continue -->
</datalist>
FALLING IN LOVE WITH FORMS
Mentalism
<label for="state">State</label>
<input id="state" name="state" list="states">
<datalist id="states">
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<!-- options continue -->
</datalist>
FALLING IN LOVE WITH FORMS
Mentalism
<label for="state">State</label>
<input id="state" name="state" list="states">
<datalist id="states">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<!-- options continue -->
</datalist>
FALLING IN LOVE WITH FORMS
Mentalism: smart fallbacks
<label for=“state" id=“state_label”>State</label>
<datalist id=“states”>
<select name=“state” aria-labelledby=“state_label”>
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<!-- options continue -->
</select>
If other, please specify
</datalist>
<input id="state" name="state" list="states">
Based on work by Jeremy Keith: http://adactio.com/journal/4272
FALLING IN LOVE WITH FORMS
Based on work by Jeremy Keith: http://adactio.com/journal/4272
Mentalism: smart fallbacks
<label for=“state" id=“state_label”>State</label>
<datalist id=“states”>
<select name=“state” aria-labelledby=“state_label”>
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<!-- options continue -->
</select>
If other, please specify
</datalist>
<input id="state" name="state" list="states">
FALLING IN LOVE WITH FORMS
Mentalism: smart fallbacks
<label for=“state" id=“state_label”>State</label>
<datalist id=“states”>
<select name=“state” aria-labelledby=“state_label”>
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<!-- options continue -->
</select>
If other, please specify
</datalist>
<input id="state" name="state" list="states">
Based on work by Jeremy Keith: http://adactio.com/journal/4272
FALLING IN LOVE WITH FORMS
Mentalism: smart fallbacks
<label for=“state" id=“state_label”>State</label>
<datalist id=“states”>
<select name=“state” aria-labelledby=“state_label”>
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<!-- options continue -->
</select>
If other, please specify
</datalist>
<input id="state" name="state" list="states">
Based on work by Jeremy Keith: http://adactio.com/journal/4272
Ok, I get it: forms in
HTML5 are awesome.
But how should we
organize our forms?
FALLING IN LOVE WITH FORMS
Do we divide it up?
<div>
<label for=“full_name”>Your Name</label>
<input id=“full_name” name=“full_name” required>
</div>
FALLING IN LOVE WITH FORMS
Do paragraphs make sense?
<p>
<label for=“full_name”>Your Name</label>
<input id=“full_name” name=“full_name” required>
</p>
FALLING IN LOVE WITH FORMS
Is it a list of questions?
<ol>
<li>
<label for=“full_name”>Your Name</label>
<input id=“full_name” name=“full_name” required>
</li>
</ol>
FALLING IN LOVE WITH FORMS
Is it a list of questions?
form ol,
form ul {
list-style: none;
margin: 0;
padding: 0;
}
FALLING IN LOVE WITH FORMS
Control Group Classification
<li class=“text”>
<label for=“full_name”>Your Name</label>
<input id=“full_name” name=“full_name” required>
</li>
FALLING IN LOVE WITH FORMS
Control Group Classification
<li class=“form-control form-control--text”>
<label for=“full_name”>Your Name</label>
<input id=“full_name” name=“full_name” required>
</li>
FALLING IN LOVE WITH FORMS
Control Group Classification
<li class=“text”>
<label for=“full_name”>Your Name</label>
<input id=“full_name” name=“full_name” required>
</li>
FALLING IN LOVE WITH FORMS
Control Group Classification
<li class=“email”>
<label for=“email”>Your Email</label>
<input type=“email” id=“email” name=“email” required
aria-describedby=“email-note”>
<em class=“note” id=“email-note”>
We will only use your email address to respond
to your message.
</em>
</li>
FALLING IN LOVE WITH FORMS
Control Group Classification
<li class=“select”>
<label for=“subject”>Purpose of Your Message</label>
<select id="subject" name="subject">
<option>Question/Comment</option>
<option>Article Error</option>
<option>Website Bug Report</option>
<option>Ask the Sherpas a question</option>
</select>
</li>
FALLING IN LOVE WITH FORMS
Control Group Classification
<li class=“textarea”>
<label for=“message”>Your Message</label>
<textarea id="message" name=“message"></textarea>
</li>
FALLING IN LOVE WITH FORMS
Control Group Classification
<li class=“buttons”>
<button type=“submit”>Send My Message</button>
</li>
Makes sense.
What about more
complex form
constructs?
FALLING IN LOVE WITH FORMS
Pattern 3: Confirmations
<input type=“checkbox” name=“newsletter” value=“yes”>
Sign me up for this newsletter
FALLING IN LOVE WITH FORMS
Pattern 3: Confirmations
<input type=“checkbox” name=“newsletter” value=“yes”
id=“newsletter”>
<label for=“newsletter”>Sign me up for this newsletter</label>
FALLING IN LOVE WITH FORMS
Pattern 3: Confirmations
<label>
<input type=“checkbox” name=“newsletter” value=“yes”>
Sign me up for this newsletter
</label>
FALLING IN LOVE WITH FORMS
Pattern 3: Confirmations
input {
/* Styles for most normal input types */
}
label input {
/* Styles for checkbox and radio controls */
}
FALLING IN LOVE WITH FORMS
Pattern 3: Confirmations
<label for=“newsletter”>
<input type=“checkbox” name=“newsletter” value=“yes”
id=“newsletter”>
Sign me up for this newsletter
</label>
FALLING IN LOVE WITH FORMS
Pattern 4: Multiple Choice
Tablets (9 available)
<label for="asus-nexus-7">
<input type="checkbox" name="device[]" id=“asus-nexus-7">
Asus Nexus 7
</label>
<!-- more options -->
FALLING IN LOVE WITH FORMS
Pattern 4: Multiple Choice
Tablets (8 available)
<ul>
<li><!-- Asus Nexus 7 --></li>
<!-- more options -->
</ul>
FALLING IN LOVE WITH FORMS
Pattern 4: Multiple Choice
<fieldset>
<legend>Tablets (9 available)</legend>
<ul>
<li><!-- Asus Nexus 7 --></li>
<!-- more options -->
</ul>
</fieldset>
FALLING IN LOVE WITH FORMS
Pattern 4: Multiple Choice
<fieldset>
<legend>Tablets <em>(9 available)</em></legend>
<ul>
<li><!-- Asus Nexus 7 --></li>
<!-- more options -->
</ul>
</fieldset>
FALLING IN LOVE WITH FORMS
Pattern 4: Multiple Choice
<li class=“grouped checkboxes”>
<fieldset>
<legend>Tablets <em>(9 available)</em></legend>
<ul>
<li><!-- Asus Nexus 7 --></li>
<!-- more options -->
</ul>
</fieldset>
</li>
FALLING IN LOVE WITH FORMS
Pattern 5: Related Entry
Requested Day and Time
<label for="requested_date">Requested Day</label>
<select id=“requested_date" name=“requested_date" required=“”>
<!-- options —>
</select>
<label for="requested_time">Requested Time</label>
<select id="requested_time" name=“requested_time" required="">
<!-- options —>
</select>
FALLING IN LOVE WITH FORMS
Pattern 5: Related Entry
<fieldset>
<legend>Requested Day and Time</legend>
<label for="requested_date">Requested Day</label>
<select id=“requested_date" name="requested_date"
required=“”><!-- options --></select>
<label for="requested_time">Requested Time</label>
<select id="requested_time" name=“requested_time" required="">
<!-- options --></select>
</fieldset>
FALLING IN LOVE WITH FORMS
Pattern 5: Related Entry
<li class=“grouped date-time-selects”>
<fieldset>
<legend>Requested Day and Time</legend>
<label for="requested_date">Requested Day</label>
<select id=“requested_date" name="requested_date"
required=“”><!-- options --></select>
<!-- continued… -->
</fieldset>
</li>
FALLING IN LOVE WITH FORMS
Pattern 5: Related Entry
/* Hide the labels in an accessible way */
form .date-time-selects label {
position: absolute;
height: 1px;
width: 1px;
overflow: hidden;
clip: rect(1px 1px 1px 1px); /* IE6 & IE7 */
clip: rect(1px, 1px, 1px, 1px);
}
HELPFUL HINT
Focus on

making the form
read naturally
and easily.
HELPFUL HINT
You can’t always
make an interface
perfect, but you can
make it usable.
Ok, I think I’m
getting it, but

small screens still

scare me a little.
FALLING IN LOVE WITH FORMS
Tap-friendly hit targets
.confirm label,
.radios label,
.checkboxes label {
margin: -1em 0;
padding: 1em 0;
}
FALLING IN LOVE WITH FORMS
Tap-friendly hit targets
.confirm label,
.radios label,
.checkboxes label {
margin: -1em 0;
padding: 1em 0;
}
FALLING IN LOVE WITH FORMS
No layout before its time
.form-control {
clear: both;
}
.form-control label,
.form-control input {
float: left;
width: 34%;
}
.form-control input {
width: 63%;
}
FALLING IN LOVE WITH FORMS
No layout before its time
.form-control label,
.form-control input {
display: block;
margin-bottom: .328em;
}
FALLING IN LOVE WITH FORMS
No layout before its time
.form-control label,
.form-control input {
display: block;
margin-bottom: .328em;
}
@media only screen and (min-width: 60em) {
/* Side by Side layout */
}
YMQMV
FALLING IN LOVE WITH FORMS
No layout before its time
@media only screen and (min-width:30em) {
form .grouped ul li {
float: left;
width: 50%;
}
} YMQMV
Makes sense.
Could we talk a bit

about validation?
FALLING IN LOVE WITH FORMS
Requiring a field
<p>Fields marked with a * are required.</p>
<p>
<label for=“first_name">
First Name <abbr title=“required">*</abbr>
</label>
<input id="first_name" name="first_name" required>
</p>
FALLING IN LOVE WITH FORMS
Requiring a field
<p>Fields marked with a * are required.</p>
<p>
<label for=“first_name">
First Name <abbr title=“required">*</abbr>
</label>
<input id="first_name" name="first_name" required>
</p>
FALLING IN LOVE WITH FORMS
Requiring a field
<p>Fields marked with a * are
<strong id="required">required</strong>.</p>
<p>
<label for=“first_name">
First Name
<abbr title=“required” aria-labelledby=“required”>*</abbr>
</label>
<input id="first_name" name="first_name" required>
</p>
FALLING IN LOVE WITH FORMS
Requiring a field
<p tabindex="0">Fields marked with a * are required.</p>
<p>
<label for=“first_name">
First Name <abbr title=“required">*</abbr>
</label>
<input id="first_name" name="first_name" required
aria-required="true">
</p>
HELPFUL HINT
Focus on

making the form
read naturally
and easily.
FALLING IN LOVE WITH FORMS
Native validation
<label for=“email”>Your Email</label>
<input type=“email” id=“email” name=“email” required>
We will only use your email address to respond to your message.
FALLING IN LOVE WITH FORMS
Non-native format validation
<label for="test">What is 1 + 1?</label>
<input id="test" type=“number" name=“test”
pattern=“[0-9]*”
>
FALLING IN LOVE WITH FORMS
Non-native format validation
<label for=“test">Enter three numbers
followed by two letters</label>
<input id="test" name=“test”
placeholder=“e.g. 123ab”
pattern=“d{3}[a-zA-Z]{2}”
>
HELPFUL HINT
Don’t forget about
server-side
validation either.
FALLING IN LOVE WITH FORMS
Provide a list of errors
retreats4geeks.com/contact
FALLING IN LOVE WITH FORMS
Provide a list of errors
<div role=“alert”>
<p>There were errors with your form submission:</p>
<ol>
<li><a href="#message">Message</a> is a required field</li>
<li><a href="#name">Name</a> is a required field</li>
<li><a href="#email">Email</a> is a required field</li>
</ol>
</div>
FALLING IN LOVE WITH FORMS
Provide easy access to them
<div role=“alert”>
<p>There were errors with your form submission:</p>
<ol>
<li><a href="#message">Message</a> is a required field</li>
<li><a href="#name">Name</a> is a required field</li>
<li><a href="#email">Email</a> is a required field</li>
</ol>
</div>
FALLING IN LOVE WITH FORMS
Provide easy access to them
<label for=“message”>
Message <abbr title=“required">*</abbr>
</label>
<textarea id="message" name="message" required></textarea>
FALLING IN LOVE WITH FORMS
Provide field-level help
<li class="text validation-error">
<label for=“email”>Your Email <abbr title=“required">*</abbr>
</label>
<input id="email" type="email" name="email"
required=“" aria-required=“true”
aria-invalid="true"
aria-describedby=“email-error"
>
<strong id="email-error" class=“validation-error-message">
Your email address is required</strong>
</li>
FALLING IN LOVE WITH FORMS
Provide field-level help
li.validation-error {
color: #922026;
}
li.validation-error input,
li.validation-error textarea,
li.validation-error select {
border-color: #922026;
}
FALLING IN LOVE WITH FORMS
Provide field-level help
.validation-error label::before {
content: “x ";
font-family: Verdana, sans-serif;
speak: none; /* The future! */
}
FALLING IN LOVE WITH FORMS
Provide field-level help
.validation-error label::before {
content: “Please Enter ";
font-family: Verdana, sans-serif;
}
One More Thing…
Falling in Love with Forms [F0WD 2015]
Forms suck.
Forms suck.
can
a lot less
Forms can be…
easy to build
predictable
effortless to use
and accessible
Questions?
Tweet me at

@AaronGustafson
Thank you!
@AaronGustafson
aaron-gustafson.com
slideshare.net/AaronGustafson

More Related Content

What's hot

18servers And Forms
18servers And Forms18servers And Forms
18servers And FormsAdil Jafri
 
Chapter 8 - Web Design
Chapter 8 - Web DesignChapter 8 - Web Design
Chapter 8 - Web Designtclanton4
 
Printable version (must have Word)
Printable version (must have Word)Printable version (must have Word)
Printable version (must have Word)butest
 
Learning To Love Forms (The Ajax Experience West 2007)
Learning To Love Forms (The Ajax Experience West 2007)Learning To Love Forms (The Ajax Experience West 2007)
Learning To Love Forms (The Ajax Experience West 2007)Aaron Gustafson
 
Fork forms library
Fork forms libraryFork forms library
Fork forms libraryYoniWeb
 
Learning To Love Forms [The Ajax Experience East 2007]
Learning To Love Forms [The Ajax Experience East 2007]Learning To Love Forms [The Ajax Experience East 2007]
Learning To Love Forms [The Ajax Experience East 2007]Aaron Gustafson
 
Web Design Course - Lecture 6 - HTML form and form validation
Web Design Course - Lecture 6 - HTML form and form validationWeb Design Course - Lecture 6 - HTML form and form validation
Web Design Course - Lecture 6 - HTML form and form validationAl-Mamun Sarkar
 
Stylesheets for Online Help - Scott DeLoach, ClickStart
Stylesheets for Online Help - Scott DeLoach, ClickStartStylesheets for Online Help - Scott DeLoach, ClickStart
Stylesheets for Online Help - Scott DeLoach, ClickStartScott DeLoach
 
Learning To Love Forms (An Event Apart San Francisco '07)
Learning To Love Forms (An Event Apart San Francisco '07)Learning To Love Forms (An Event Apart San Francisco '07)
Learning To Love Forms (An Event Apart San Francisco '07)Aaron Gustafson
 

What's hot (12)

18servers And Forms
18servers And Forms18servers And Forms
18servers And Forms
 
Learn html5
Learn html5Learn html5
Learn html5
 
Chapter 8 - Web Design
Chapter 8 - Web DesignChapter 8 - Web Design
Chapter 8 - Web Design
 
Printable version (must have Word)
Printable version (must have Word)Printable version (must have Word)
Printable version (must have Word)
 
Learning To Love Forms (The Ajax Experience West 2007)
Learning To Love Forms (The Ajax Experience West 2007)Learning To Love Forms (The Ajax Experience West 2007)
Learning To Love Forms (The Ajax Experience West 2007)
 
Html 5 Forms
Html 5 FormsHtml 5 Forms
Html 5 Forms
 
Fork forms library
Fork forms libraryFork forms library
Fork forms library
 
Learning To Love Forms [The Ajax Experience East 2007]
Learning To Love Forms [The Ajax Experience East 2007]Learning To Love Forms [The Ajax Experience East 2007]
Learning To Love Forms [The Ajax Experience East 2007]
 
Web Design Course - Lecture 6 - HTML form and form validation
Web Design Course - Lecture 6 - HTML form and form validationWeb Design Course - Lecture 6 - HTML form and form validation
Web Design Course - Lecture 6 - HTML form and form validation
 
webDen Hi-Fi
webDen Hi-FiwebDen Hi-Fi
webDen Hi-Fi
 
Stylesheets for Online Help - Scott DeLoach, ClickStart
Stylesheets for Online Help - Scott DeLoach, ClickStartStylesheets for Online Help - Scott DeLoach, ClickStart
Stylesheets for Online Help - Scott DeLoach, ClickStart
 
Learning To Love Forms (An Event Apart San Francisco '07)
Learning To Love Forms (An Event Apart San Francisco '07)Learning To Love Forms (An Event Apart San Francisco '07)
Learning To Love Forms (An Event Apart San Francisco '07)
 

Viewers also liked

Falling in Love with Forms [Øredev 2015]
Falling in Love with Forms [Øredev 2015]Falling in Love with Forms [Øredev 2015]
Falling in Love with Forms [Øredev 2015]Aaron Gustafson
 
Beyond Responsive [18F 2015]
Beyond Responsive [18F 2015]Beyond Responsive [18F 2015]
Beyond Responsive [18F 2015]Aaron Gustafson
 
Ruining the User Experience [SXSW 2007]
Ruining the User Experience [SXSW 2007]Ruining the User Experience [SXSW 2007]
Ruining the User Experience [SXSW 2007]Aaron Gustafson
 
Designing the Conversation [SmashingConf 2016]
Designing the Conversation [SmashingConf 2016]Designing the Conversation [SmashingConf 2016]
Designing the Conversation [SmashingConf 2016]Aaron Gustafson
 
Writing for Engagement [TechReady 22]
Writing for Engagement [TechReady 22]Writing for Engagement [TechReady 22]
Writing for Engagement [TechReady 22]Aaron Gustafson
 
Designing the Conversation [SpeechTek 2016]
Designing the Conversation [SpeechTek 2016]Designing the Conversation [SpeechTek 2016]
Designing the Conversation [SpeechTek 2016]Aaron Gustafson
 
There Are No “Buts” in Progressive Enhancement [Øredev 2015]
There Are No “Buts” in Progressive Enhancement [Øredev 2015]There Are No “Buts” in Progressive Enhancement [Øredev 2015]
There Are No “Buts” in Progressive Enhancement [Øredev 2015]Aaron Gustafson
 
Designing with Empathy [Code & Creativity 2014]
Designing with Empathy [Code & Creativity 2014]Designing with Empathy [Code & Creativity 2014]
Designing with Empathy [Code & Creativity 2014]Aaron Gustafson
 

Viewers also liked (8)

Falling in Love with Forms [Øredev 2015]
Falling in Love with Forms [Øredev 2015]Falling in Love with Forms [Øredev 2015]
Falling in Love with Forms [Øredev 2015]
 
Beyond Responsive [18F 2015]
Beyond Responsive [18F 2015]Beyond Responsive [18F 2015]
Beyond Responsive [18F 2015]
 
Ruining the User Experience [SXSW 2007]
Ruining the User Experience [SXSW 2007]Ruining the User Experience [SXSW 2007]
Ruining the User Experience [SXSW 2007]
 
Designing the Conversation [SmashingConf 2016]
Designing the Conversation [SmashingConf 2016]Designing the Conversation [SmashingConf 2016]
Designing the Conversation [SmashingConf 2016]
 
Writing for Engagement [TechReady 22]
Writing for Engagement [TechReady 22]Writing for Engagement [TechReady 22]
Writing for Engagement [TechReady 22]
 
Designing the Conversation [SpeechTek 2016]
Designing the Conversation [SpeechTek 2016]Designing the Conversation [SpeechTek 2016]
Designing the Conversation [SpeechTek 2016]
 
There Are No “Buts” in Progressive Enhancement [Øredev 2015]
There Are No “Buts” in Progressive Enhancement [Øredev 2015]There Are No “Buts” in Progressive Enhancement [Øredev 2015]
There Are No “Buts” in Progressive Enhancement [Øredev 2015]
 
Designing with Empathy [Code & Creativity 2014]
Designing with Empathy [Code & Creativity 2014]Designing with Empathy [Code & Creativity 2014]
Designing with Empathy [Code & Creativity 2014]
 

Similar to Falling in Love with Forms [F0WD 2015]

Falling in Love With Forms [An Event Apart DC 2015]
Falling in Love With Forms [An Event Apart DC 2015]Falling in Love With Forms [An Event Apart DC 2015]
Falling in Love With Forms [An Event Apart DC 2015]Aaron Gustafson
 
Falling in Love with Forms [BDConf 2014]
Falling in Love with Forms [BDConf 2014]Falling in Love with Forms [BDConf 2014]
Falling in Love with Forms [BDConf 2014]Aaron Gustafson
 
HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Formstina1357
 
Designed for Success: Optimizing the Email Experience
Designed for Success: Optimizing the Email ExperienceDesigned for Success: Optimizing the Email Experience
Designed for Success: Optimizing the Email ExperienceLitmus
 
Google Search
Google SearchGoogle Search
Google Searchjjs1981
 
Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML FormsMike Crabb
 
Justine Jordan | SearchLove San Diego, 'Designed for Success: Optimizing The ...
Justine Jordan | SearchLove San Diego, 'Designed for Success: Optimizing The ...Justine Jordan | SearchLove San Diego, 'Designed for Success: Optimizing The ...
Justine Jordan | SearchLove San Diego, 'Designed for Success: Optimizing The ...Distilled
 
LESS CSS Processor
LESS CSS ProcessorLESS CSS Processor
LESS CSS Processorsdhoman
 
HTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryHTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryFAKHRUN NISHA
 
Best Practices in Email Design & Development: HighRoad Solution Workshop
Best Practices in Email Design & Development: HighRoad Solution WorkshopBest Practices in Email Design & Development: HighRoad Solution Workshop
Best Practices in Email Design & Development: HighRoad Solution WorkshopLitmus
 
Php Form
Php FormPhp Form
Php Formlotlot
 
Keywords seo-strategies
Keywords seo-strategiesKeywords seo-strategies
Keywords seo-strategiesDebbie Morris
 
Blog Content Marketing - How to Be the Best Answer
Blog Content Marketing - How to Be the Best AnswerBlog Content Marketing - How to Be the Best Answer
Blog Content Marketing - How to Be the Best AnswerTopRank Marketing Agency
 
Taking Your HTML Email Communications from "Ew" to "Wow"
Taking Your HTML Email Communications from "Ew" to "Wow"Taking Your HTML Email Communications from "Ew" to "Wow"
Taking Your HTML Email Communications from "Ew" to "Wow"Dave Olsen
 
Angular js form validation shashi-19-7-16
Angular js form validation shashi-19-7-16Angular js form validation shashi-19-7-16
Angular js form validation shashi-19-7-16Shashikant Bhongale
 
Html basics 10 form
Html basics 10 formHtml basics 10 form
Html basics 10 formH K
 

Similar to Falling in Love with Forms [F0WD 2015] (18)

Falling in Love With Forms [An Event Apart DC 2015]
Falling in Love With Forms [An Event Apart DC 2015]Falling in Love With Forms [An Event Apart DC 2015]
Falling in Love With Forms [An Event Apart DC 2015]
 
Falling in Love with Forms [BDConf 2014]
Falling in Love with Forms [BDConf 2014]Falling in Love with Forms [BDConf 2014]
Falling in Love with Forms [BDConf 2014]
 
HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Forms
 
Designed for Success: Optimizing the Email Experience
Designed for Success: Optimizing the Email ExperienceDesigned for Success: Optimizing the Email Experience
Designed for Success: Optimizing the Email Experience
 
Google Search
Google SearchGoogle Search
Google Search
 
Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML Forms
 
Handout7 html forms
Handout7 html formsHandout7 html forms
Handout7 html forms
 
Forms 2010
Forms 2010Forms 2010
Forms 2010
 
Justine Jordan | SearchLove San Diego, 'Designed for Success: Optimizing The ...
Justine Jordan | SearchLove San Diego, 'Designed for Success: Optimizing The ...Justine Jordan | SearchLove San Diego, 'Designed for Success: Optimizing The ...
Justine Jordan | SearchLove San Diego, 'Designed for Success: Optimizing The ...
 
LESS CSS Processor
LESS CSS ProcessorLESS CSS Processor
LESS CSS Processor
 
HTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryHTML/CSS/java Script/Jquery
HTML/CSS/java Script/Jquery
 
Best Practices in Email Design & Development: HighRoad Solution Workshop
Best Practices in Email Design & Development: HighRoad Solution WorkshopBest Practices in Email Design & Development: HighRoad Solution Workshop
Best Practices in Email Design & Development: HighRoad Solution Workshop
 
Php Form
Php FormPhp Form
Php Form
 
Keywords seo-strategies
Keywords seo-strategiesKeywords seo-strategies
Keywords seo-strategies
 
Blog Content Marketing - How to Be the Best Answer
Blog Content Marketing - How to Be the Best AnswerBlog Content Marketing - How to Be the Best Answer
Blog Content Marketing - How to Be the Best Answer
 
Taking Your HTML Email Communications from "Ew" to "Wow"
Taking Your HTML Email Communications from "Ew" to "Wow"Taking Your HTML Email Communications from "Ew" to "Wow"
Taking Your HTML Email Communications from "Ew" to "Wow"
 
Angular js form validation shashi-19-7-16
Angular js form validation shashi-19-7-16Angular js form validation shashi-19-7-16
Angular js form validation shashi-19-7-16
 
Html basics 10 form
Html basics 10 formHtml basics 10 form
Html basics 10 form
 

More from Aaron Gustafson

Delivering Critical Information and Services [JavaScript & Friends 2021]
Delivering Critical Information and Services [JavaScript & Friends 2021]Delivering Critical Information and Services [JavaScript & Friends 2021]
Delivering Critical Information and Services [JavaScript & Friends 2021]Aaron Gustafson
 
Adapting to Reality [Guest Lecture, March 2021]
Adapting to Reality [Guest Lecture, March 2021]Adapting to Reality [Guest Lecture, March 2021]
Adapting to Reality [Guest Lecture, March 2021]Aaron Gustafson
 
Designing the Conversation [Beyond Tellerrand 2019]
Designing the Conversation [Beyond Tellerrand 2019]Designing the Conversation [Beyond Tellerrand 2019]
Designing the Conversation [Beyond Tellerrand 2019]Aaron Gustafson
 
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]Aaron Gustafson
 
Progressive Web Apps: Where Do I Begin?
Progressive Web Apps: Where Do I Begin?Progressive Web Apps: Where Do I Begin?
Progressive Web Apps: Where Do I Begin?Aaron Gustafson
 
Media in the Age of PWAs [ImageCon 2019]
Media in the Age of PWAs [ImageCon 2019]Media in the Age of PWAs [ImageCon 2019]
Media in the Age of PWAs [ImageCon 2019]Aaron Gustafson
 
Adapting to Reality [Starbucks Lunch & Learn]
Adapting to Reality [Starbucks Lunch & Learn]Adapting to Reality [Starbucks Lunch & Learn]
Adapting to Reality [Starbucks Lunch & Learn]Aaron Gustafson
 
Conversational Semantics for the Web [CascadiaJS 2018]
Conversational Semantics for the Web [CascadiaJS 2018]Conversational Semantics for the Web [CascadiaJS 2018]
Conversational Semantics for the Web [CascadiaJS 2018]Aaron Gustafson
 
Better Performance === Greater Accessibility [Inclusive Design 24 2018]
Better Performance === Greater Accessibility [Inclusive Design 24 2018]Better Performance === Greater Accessibility [Inclusive Design 24 2018]
Better Performance === Greater Accessibility [Inclusive Design 24 2018]Aaron Gustafson
 
PWA: Where Do I Begin? [Microsoft Ignite 2018]
PWA: Where Do I Begin? [Microsoft Ignite 2018]PWA: Where Do I Begin? [Microsoft Ignite 2018]
PWA: Where Do I Begin? [Microsoft Ignite 2018]Aaron Gustafson
 
Designing the Conversation [Concatenate 2018]
Designing the Conversation [Concatenate 2018]Designing the Conversation [Concatenate 2018]
Designing the Conversation [Concatenate 2018]Aaron Gustafson
 
Designing the Conversation [Accessibility DC 2018]
Designing the Conversation [Accessibility DC 2018]Designing the Conversation [Accessibility DC 2018]
Designing the Conversation [Accessibility DC 2018]Aaron Gustafson
 
Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]Aaron Gustafson
 
The Web Should Just Work for Everyone
The Web Should Just Work for EveryoneThe Web Should Just Work for Everyone
The Web Should Just Work for EveryoneAaron Gustafson
 
Performance as User Experience [AEA SEA 2018]
Performance as User Experience [AEA SEA 2018]Performance as User Experience [AEA SEA 2018]
Performance as User Experience [AEA SEA 2018]Aaron Gustafson
 
Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]Aaron Gustafson
 
Advanced Design Methods 1, Day 2
Advanced Design Methods 1, Day 2Advanced Design Methods 1, Day 2
Advanced Design Methods 1, Day 2Aaron Gustafson
 
Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1Aaron Gustafson
 
Designing the Conversation [Paris Web 2017]
Designing the Conversation [Paris Web 2017]Designing the Conversation [Paris Web 2017]
Designing the Conversation [Paris Web 2017]Aaron Gustafson
 
Exploring Adaptive Interfaces [Generate 2017]
Exploring Adaptive Interfaces [Generate 2017]Exploring Adaptive Interfaces [Generate 2017]
Exploring Adaptive Interfaces [Generate 2017]Aaron Gustafson
 

More from Aaron Gustafson (20)

Delivering Critical Information and Services [JavaScript & Friends 2021]
Delivering Critical Information and Services [JavaScript & Friends 2021]Delivering Critical Information and Services [JavaScript & Friends 2021]
Delivering Critical Information and Services [JavaScript & Friends 2021]
 
Adapting to Reality [Guest Lecture, March 2021]
Adapting to Reality [Guest Lecture, March 2021]Adapting to Reality [Guest Lecture, March 2021]
Adapting to Reality [Guest Lecture, March 2021]
 
Designing the Conversation [Beyond Tellerrand 2019]
Designing the Conversation [Beyond Tellerrand 2019]Designing the Conversation [Beyond Tellerrand 2019]
Designing the Conversation [Beyond Tellerrand 2019]
 
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]
 
Progressive Web Apps: Where Do I Begin?
Progressive Web Apps: Where Do I Begin?Progressive Web Apps: Where Do I Begin?
Progressive Web Apps: Where Do I Begin?
 
Media in the Age of PWAs [ImageCon 2019]
Media in the Age of PWAs [ImageCon 2019]Media in the Age of PWAs [ImageCon 2019]
Media in the Age of PWAs [ImageCon 2019]
 
Adapting to Reality [Starbucks Lunch & Learn]
Adapting to Reality [Starbucks Lunch & Learn]Adapting to Reality [Starbucks Lunch & Learn]
Adapting to Reality [Starbucks Lunch & Learn]
 
Conversational Semantics for the Web [CascadiaJS 2018]
Conversational Semantics for the Web [CascadiaJS 2018]Conversational Semantics for the Web [CascadiaJS 2018]
Conversational Semantics for the Web [CascadiaJS 2018]
 
Better Performance === Greater Accessibility [Inclusive Design 24 2018]
Better Performance === Greater Accessibility [Inclusive Design 24 2018]Better Performance === Greater Accessibility [Inclusive Design 24 2018]
Better Performance === Greater Accessibility [Inclusive Design 24 2018]
 
PWA: Where Do I Begin? [Microsoft Ignite 2018]
PWA: Where Do I Begin? [Microsoft Ignite 2018]PWA: Where Do I Begin? [Microsoft Ignite 2018]
PWA: Where Do I Begin? [Microsoft Ignite 2018]
 
Designing the Conversation [Concatenate 2018]
Designing the Conversation [Concatenate 2018]Designing the Conversation [Concatenate 2018]
Designing the Conversation [Concatenate 2018]
 
Designing the Conversation [Accessibility DC 2018]
Designing the Conversation [Accessibility DC 2018]Designing the Conversation [Accessibility DC 2018]
Designing the Conversation [Accessibility DC 2018]
 
Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]
 
The Web Should Just Work for Everyone
The Web Should Just Work for EveryoneThe Web Should Just Work for Everyone
The Web Should Just Work for Everyone
 
Performance as User Experience [AEA SEA 2018]
Performance as User Experience [AEA SEA 2018]Performance as User Experience [AEA SEA 2018]
Performance as User Experience [AEA SEA 2018]
 
Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]
 
Advanced Design Methods 1, Day 2
Advanced Design Methods 1, Day 2Advanced Design Methods 1, Day 2
Advanced Design Methods 1, Day 2
 
Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1
 
Designing the Conversation [Paris Web 2017]
Designing the Conversation [Paris Web 2017]Designing the Conversation [Paris Web 2017]
Designing the Conversation [Paris Web 2017]
 
Exploring Adaptive Interfaces [Generate 2017]
Exploring Adaptive Interfaces [Generate 2017]Exploring Adaptive Interfaces [Generate 2017]
Exploring Adaptive Interfaces [Generate 2017]
 

Recently uploaded

Vision Forward: Tracing Image Search SEO From Its Roots To AI-Enhanced Horizons
Vision Forward: Tracing Image Search SEO From Its Roots To AI-Enhanced HorizonsVision Forward: Tracing Image Search SEO From Its Roots To AI-Enhanced Horizons
Vision Forward: Tracing Image Search SEO From Its Roots To AI-Enhanced HorizonsRoxana Stingu
 
Computer 10 Lesson 8: Building a Website
Computer 10 Lesson 8: Building a WebsiteComputer 10 Lesson 8: Building a Website
Computer 10 Lesson 8: Building a WebsiteMavein
 
Zero-day Vulnerabilities
Zero-day VulnerabilitiesZero-day Vulnerabilities
Zero-day Vulnerabilitiesalihassaah1994
 
A_Z-1_0_4T_00A-EN_U-Po_w_erPoint_06.pptx
A_Z-1_0_4T_00A-EN_U-Po_w_erPoint_06.pptxA_Z-1_0_4T_00A-EN_U-Po_w_erPoint_06.pptx
A_Z-1_0_4T_00A-EN_U-Po_w_erPoint_06.pptxjayshuklatrainer
 
Niche Domination Prodigy Review Plus Bonus
Niche Domination Prodigy Review Plus BonusNiche Domination Prodigy Review Plus Bonus
Niche Domination Prodigy Review Plus BonusSkylark Nobin
 
TYPES AND DEFINITION OF ONLINE CRIMES AND HAZARDS
TYPES AND DEFINITION OF ONLINE CRIMES AND HAZARDSTYPES AND DEFINITION OF ONLINE CRIMES AND HAZARDS
TYPES AND DEFINITION OF ONLINE CRIMES AND HAZARDSedrianrheine
 
LESSON 10/ GROUP 10/ ST. THOMAS AQUINASS
LESSON 10/ GROUP 10/ ST. THOMAS AQUINASSLESSON 10/ GROUP 10/ ST. THOMAS AQUINASS
LESSON 10/ GROUP 10/ ST. THOMAS AQUINASSlesteraporado16
 
LESSON 5 GROUP 10 ST. THOMAS AQUINAS.pdf
LESSON 5 GROUP 10 ST. THOMAS AQUINAS.pdfLESSON 5 GROUP 10 ST. THOMAS AQUINAS.pdf
LESSON 5 GROUP 10 ST. THOMAS AQUINAS.pdfmchristianalwyn
 
Check out the Free Landing Page Hosting in 2024
Check out the Free Landing Page Hosting in 2024Check out the Free Landing Page Hosting in 2024
Check out the Free Landing Page Hosting in 2024Shubham Pant
 
Presentation2.pptx - JoyPress Wordpress
Presentation2.pptx -  JoyPress WordpressPresentation2.pptx -  JoyPress Wordpress
Presentation2.pptx - JoyPress Wordpressssuser166378
 
WordPress by the numbers - Jan Loeffler, CTO WebPros, CloudFest 2024
WordPress by the numbers - Jan Loeffler, CTO WebPros, CloudFest 2024WordPress by the numbers - Jan Loeffler, CTO WebPros, CloudFest 2024
WordPress by the numbers - Jan Loeffler, CTO WebPros, CloudFest 2024Jan Löffler
 
Introduction to ICANN and Fellowship program by Shreedeep Rayamajhi.pdf
Introduction to ICANN and Fellowship program  by Shreedeep Rayamajhi.pdfIntroduction to ICANN and Fellowship program  by Shreedeep Rayamajhi.pdf
Introduction to ICANN and Fellowship program by Shreedeep Rayamajhi.pdfShreedeep Rayamajhi
 
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...APNIC
 
world Tuberculosis day ppt 25-3-2024.pptx
world Tuberculosis day ppt 25-3-2024.pptxworld Tuberculosis day ppt 25-3-2024.pptx
world Tuberculosis day ppt 25-3-2024.pptxnaveenithkrishnan
 
Bio Medical Waste Management Guideliness 2023 ppt.pptx
Bio Medical Waste Management Guideliness 2023 ppt.pptxBio Medical Waste Management Guideliness 2023 ppt.pptx
Bio Medical Waste Management Guideliness 2023 ppt.pptxnaveenithkrishnan
 

Recently uploaded (15)

Vision Forward: Tracing Image Search SEO From Its Roots To AI-Enhanced Horizons
Vision Forward: Tracing Image Search SEO From Its Roots To AI-Enhanced HorizonsVision Forward: Tracing Image Search SEO From Its Roots To AI-Enhanced Horizons
Vision Forward: Tracing Image Search SEO From Its Roots To AI-Enhanced Horizons
 
Computer 10 Lesson 8: Building a Website
Computer 10 Lesson 8: Building a WebsiteComputer 10 Lesson 8: Building a Website
Computer 10 Lesson 8: Building a Website
 
Zero-day Vulnerabilities
Zero-day VulnerabilitiesZero-day Vulnerabilities
Zero-day Vulnerabilities
 
A_Z-1_0_4T_00A-EN_U-Po_w_erPoint_06.pptx
A_Z-1_0_4T_00A-EN_U-Po_w_erPoint_06.pptxA_Z-1_0_4T_00A-EN_U-Po_w_erPoint_06.pptx
A_Z-1_0_4T_00A-EN_U-Po_w_erPoint_06.pptx
 
Niche Domination Prodigy Review Plus Bonus
Niche Domination Prodigy Review Plus BonusNiche Domination Prodigy Review Plus Bonus
Niche Domination Prodigy Review Plus Bonus
 
TYPES AND DEFINITION OF ONLINE CRIMES AND HAZARDS
TYPES AND DEFINITION OF ONLINE CRIMES AND HAZARDSTYPES AND DEFINITION OF ONLINE CRIMES AND HAZARDS
TYPES AND DEFINITION OF ONLINE CRIMES AND HAZARDS
 
LESSON 10/ GROUP 10/ ST. THOMAS AQUINASS
LESSON 10/ GROUP 10/ ST. THOMAS AQUINASSLESSON 10/ GROUP 10/ ST. THOMAS AQUINASS
LESSON 10/ GROUP 10/ ST. THOMAS AQUINASS
 
LESSON 5 GROUP 10 ST. THOMAS AQUINAS.pdf
LESSON 5 GROUP 10 ST. THOMAS AQUINAS.pdfLESSON 5 GROUP 10 ST. THOMAS AQUINAS.pdf
LESSON 5 GROUP 10 ST. THOMAS AQUINAS.pdf
 
Check out the Free Landing Page Hosting in 2024
Check out the Free Landing Page Hosting in 2024Check out the Free Landing Page Hosting in 2024
Check out the Free Landing Page Hosting in 2024
 
Presentation2.pptx - JoyPress Wordpress
Presentation2.pptx -  JoyPress WordpressPresentation2.pptx -  JoyPress Wordpress
Presentation2.pptx - JoyPress Wordpress
 
WordPress by the numbers - Jan Loeffler, CTO WebPros, CloudFest 2024
WordPress by the numbers - Jan Loeffler, CTO WebPros, CloudFest 2024WordPress by the numbers - Jan Loeffler, CTO WebPros, CloudFest 2024
WordPress by the numbers - Jan Loeffler, CTO WebPros, CloudFest 2024
 
Introduction to ICANN and Fellowship program by Shreedeep Rayamajhi.pdf
Introduction to ICANN and Fellowship program  by Shreedeep Rayamajhi.pdfIntroduction to ICANN and Fellowship program  by Shreedeep Rayamajhi.pdf
Introduction to ICANN and Fellowship program by Shreedeep Rayamajhi.pdf
 
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
 
world Tuberculosis day ppt 25-3-2024.pptx
world Tuberculosis day ppt 25-3-2024.pptxworld Tuberculosis day ppt 25-3-2024.pptx
world Tuberculosis day ppt 25-3-2024.pptx
 
Bio Medical Waste Management Guideliness 2023 ppt.pptx
Bio Medical Waste Management Guideliness 2023 ppt.pptxBio Medical Waste Management Guideliness 2023 ppt.pptx
Bio Medical Waste Management Guideliness 2023 ppt.pptx
 

Falling in Love with Forms [F0WD 2015]

  • 1. FALLING IN LOVE WITH FORMS Aaron Gustafson @AaronGustafson slideshare.net/AaronGustafson
  • 11. Forms can be… easy to build predictable effortless to use and accessible
  • 12. It’s all in how you look at them.
  • 13. HELPFUL HINT Break large,
 complex forms into smaller, simpler, reusable patterns
  • 15. How about a
 common example? Let’s look
 at a contact form.
  • 18. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field Your Name <input type=“text” name=“full_name”>
  • 19. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field Your Name <input name=“full_name”>
  • 20. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field Your Name <input name=“full_name”/>
  • 21. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field Your Name <input name=“full_name”>
  • 22. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field <label>Your Name</label> <input name=“full_name”>
  • 23. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field <label for=“full_name”>Your Name</label> <input id=“full_name” name=“full_name”>
  • 24. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field <label for=“full_name”>Your Name</label> <input id=“full_name” name=“full_name” required>
  • 25. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input id=“email” name=“email” required> We will only use your email address to respond to your message.
  • 26. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input id=“email” name=“email” required> We will only use your email address to respond to your message.
  • 27. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input id=“email” name=“email” required> We will only use your email address to respond to your message.
  • 28. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required> We will only use your email address to respond to your message.
  • 29. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required> We will only use your email address to respond to your message.
  • 30. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required> We will only use your email address to respond to your message.
  • 31. Browsers ignore what they don’t understand
  • 33. SHAMELESS PLUG! Crafting Rich Experienceswith Progressive Enhancement SECOND EDITION ADAPTIVEWEBDESIGN by Aaron GustafsonForeword by Jeremy Keith Read Free at http://is.gd/awd1st Available
 Dec 6th
  • 34. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required> <em> We will only use your email address to respond to your message. </em>
  • 35. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required> <em class=“note”> We will only use your email address to respond to your message. </em>
  • 36. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required aria-describedby=“email-note”> <em class=“note” id=“email-note”> We will only use your email address to respond to your message. </em>
  • 37. FALLING IN LOVE WITH FORMS Rinse & Repeat <label for=“subject”>Purpose of Your Message</label> <select id="subject" name="subject"> <option>Question/Comment</option> <option>Article Error</option> <option>Website Bug Report</option> <option>Ask the Sherpas a question</option> </select>
  • 38. FALLING IN LOVE WITH FORMS Rinse & Repeat <label for=“message”>Your Message</label> <textarea id="message" name="message"></textarea>
  • 39. FALLING IN LOVE WITH FORMS Buttons <input type=“submit” value=“Send My Message”>
  • 40. FALLING IN LOVE WITH FORMS Buttons <button type=“submit”>Send My Message</button>
  • 41. HELPFUL HINT A button element can contain pretty much anything (within reason)
  • 42. That new email field looks cool, can we see more of that fancy HTML5 stuff?
  • 43. FALLING IN LOVE WITH FORMS Requesting URLs <label for=“url”>URL</label> <input type=“url” id=“url” name=“url” required aria-describedby=“url-note” > <em class=“note” id=“url-note”> Please provide the URL for the specific page that includes the area you want reviewed. </em>
  • 44. FALLING IN LOVE WITH FORMS Requesting URLs <label for=“url”>URL</label> <input type=“url” id=“url” name=“url” required aria-describedby=“url-note” > <em class=“note” id=“url-note”> Please provide the URL for the specific page that includes the area you want reviewed. </em>
  • 45. FALLING IN LOVE WITH FORMS Requesting URLs <label for=“url”>URL</label> <input type=“url” id=“url” name=“url” required aria-describedby=“url-note” > <em class=“note” id=“url-note”> Please provide the URL for the specific page that includes the area you want reviewed. </em>
  • 46. FALLING IN LOVE WITH FORMS Requesting URLs <label for=“url”>URL</label> <input type=“url” id=“url” name=“url” required aria-describedby=“url-note” > <em class=“note” id=“url-note”> Please provide the URL for the specific page that includes the area you want reviewed. </em>
  • 47. FALLING IN LOVE WITH FORMS Providing hints <label for=“url”>URL</label> <input type=“url” id=“url” name=“url” required aria-describedby=“url-note” placeholder=“http://www.yoursite.com/specific-page#anchored-section” > <em class=“note” id=“url-note”> Please provide the URL for the specific page that includes the area you want reviewed. </em>
  • 48. HELPFUL HINT Placeholders are just that: placeholders for actual content. They are not labels!
  • 49. FALLING IN LOVE WITH FORMS Providing hints <label for=“url”>URL</label> <input type=“url” id=“url” name=“url” required aria-describedby=“url-note” placeholder=“http://www.yoursite.com/specific-page#anchored-section” > <em class=“note” id=“url-note”> Please provide the URL for the specific page that includes the area you want reviewed. </em>
  • 50. FALLING IN LOVE WITH FORMS Requesting phone numbers <label for="preferred_phone">Preferred Phone</label> <input type="tel" id="preferred_phone" name=“preferred_phone” placeholder="ex. 123-456-7890” >
  • 51. FALLING IN LOVE WITH FORMS Requesting phone numbers <label for="preferred_phone">Preferred Phone</label> <input type="tel" id="preferred_phone" name=“preferred_phone” placeholder="ex. 123-456-7890” >
  • 52. FALLING IN LOVE WITH FORMS Requesting phone numbers <label for="preferred_phone">Preferred Phone</label> <input type="tel" id="preferred_phone" name=“preferred_phone” placeholder="ex. 123-456-7890” >
  • 53. FALLING IN LOVE WITH FORMS Requesting numbers <label for="test">What is 1 + 1?</label> <input id="test" type=“number" name="test">
  • 54. FALLING IN LOVE WITH FORMS Requesting numbers <label for=“volume">How Loud is Spinal Tap?</label> <input id="volume" type=“range" name=“volume” min=“0” max=“11” step=“1” >
  • 55. FALLING IN LOVE WITH FORMS Requesting numbers <label for="test">What is 1 + 1?</label> <input id="test" type=“number" name=“test” pattern=“[0-9]*” min=“0” max=“9” >
  • 56. FALLING IN LOVE WITH FORMS Requesting dates & times <label for="preferred_dates">Preferred Date to Visit</label> <input id="preferred_dates" type="date" name=“preferred_dates" required >
  • 57. FALLING IN LOVE WITH FORMS Requesting dates & times <label for="preferred_dates">Preferred Date to Visit</label> <input id="preferred_dates" type="date" name=“preferred_dates" required >
  • 58. FALLING IN LOVE WITH FORMS Requesting dates & times <label for="preferred_dates">Preferred Date to Visit</label> <input id="preferred_dates" type="date" name=“preferred_dates" required >
  • 59. FALLING IN LOVE WITH FORMS Requesting dates & times <label for="preferred_dates">Preferred Date to Visit</label> <input id="preferred_dates" type="date" name=“preferred_dates" required min=“2014-09-10” max=“2014-12-19” >
  • 60. FALLING IN LOVE WITH FORMS Requesting dates & times <label for="preferred_dates">Preferred Date to Visit</label> <input id="preferred_dates" type="date" name=“preferred_dates" required min=“2014-09-10” max=“2014-12-19” >
  • 61. FALLING IN LOVE WITH FORMS Requesting dates & times <label for="requested_tour_time">Tour Time Requested</label> <input id="requested_tour_time" type="time" name=“requested_tour_time">
  • 62. FALLING IN LOVE WITH FORMS Requesting dates & times <label for="requested_tour_time">Tour Time Requested</label> <input id="requested_tour_time" type="time" name=“requested_tour_time">
  • 63. FALLING IN LOVE WITH FORMS Mentalism <label for="state">State</label> <input id="state" name="state" list="states"> <datalist id="states"> <option>Alabama</option> <option>Alaska</option> <option>Arizona</option> <option>Arkansas</option> <!-- options continue --> </datalist>
  • 64. FALLING IN LOVE WITH FORMS Mentalism <label for="state">State</label> <input id="state" name="state" list="states"> <datalist id="states"> <option>Alabama</option> <option>Alaska</option> <option>Arizona</option> <option>Arkansas</option> <!-- options continue --> </datalist>
  • 65. FALLING IN LOVE WITH FORMS Mentalism <label for="state">State</label> <input id="state" name="state" list="states"> <datalist id="states"> <option value="AL">Alabama</option> <option value="AK">Alaska</option> <option value="AZ">Arizona</option> <option value="AR">Arkansas</option> <!-- options continue --> </datalist>
  • 66. FALLING IN LOVE WITH FORMS Mentalism: smart fallbacks <label for=“state" id=“state_label”>State</label> <datalist id=“states”> <select name=“state” aria-labelledby=“state_label”> <option>Alabama</option> <option>Alaska</option> <option>Arizona</option> <option>Arkansas</option> <!-- options continue --> </select> If other, please specify </datalist> <input id="state" name="state" list="states"> Based on work by Jeremy Keith: http://adactio.com/journal/4272
  • 67. FALLING IN LOVE WITH FORMS Based on work by Jeremy Keith: http://adactio.com/journal/4272 Mentalism: smart fallbacks <label for=“state" id=“state_label”>State</label> <datalist id=“states”> <select name=“state” aria-labelledby=“state_label”> <option>Alabama</option> <option>Alaska</option> <option>Arizona</option> <option>Arkansas</option> <!-- options continue --> </select> If other, please specify </datalist> <input id="state" name="state" list="states">
  • 68. FALLING IN LOVE WITH FORMS Mentalism: smart fallbacks <label for=“state" id=“state_label”>State</label> <datalist id=“states”> <select name=“state” aria-labelledby=“state_label”> <option>Alabama</option> <option>Alaska</option> <option>Arizona</option> <option>Arkansas</option> <!-- options continue --> </select> If other, please specify </datalist> <input id="state" name="state" list="states"> Based on work by Jeremy Keith: http://adactio.com/journal/4272
  • 69. FALLING IN LOVE WITH FORMS Mentalism: smart fallbacks <label for=“state" id=“state_label”>State</label> <datalist id=“states”> <select name=“state” aria-labelledby=“state_label”> <option>Alabama</option> <option>Alaska</option> <option>Arizona</option> <option>Arkansas</option> <!-- options continue --> </select> If other, please specify </datalist> <input id="state" name="state" list="states"> Based on work by Jeremy Keith: http://adactio.com/journal/4272
  • 70. Ok, I get it: forms in HTML5 are awesome. But how should we organize our forms?
  • 71. FALLING IN LOVE WITH FORMS Do we divide it up? <div> <label for=“full_name”>Your Name</label> <input id=“full_name” name=“full_name” required> </div>
  • 72. FALLING IN LOVE WITH FORMS Do paragraphs make sense? <p> <label for=“full_name”>Your Name</label> <input id=“full_name” name=“full_name” required> </p>
  • 73. FALLING IN LOVE WITH FORMS Is it a list of questions? <ol> <li> <label for=“full_name”>Your Name</label> <input id=“full_name” name=“full_name” required> </li> </ol>
  • 74. FALLING IN LOVE WITH FORMS Is it a list of questions? form ol, form ul { list-style: none; margin: 0; padding: 0; }
  • 75. FALLING IN LOVE WITH FORMS Control Group Classification <li class=“text”> <label for=“full_name”>Your Name</label> <input id=“full_name” name=“full_name” required> </li>
  • 76. FALLING IN LOVE WITH FORMS Control Group Classification <li class=“form-control form-control--text”> <label for=“full_name”>Your Name</label> <input id=“full_name” name=“full_name” required> </li>
  • 77. FALLING IN LOVE WITH FORMS Control Group Classification <li class=“text”> <label for=“full_name”>Your Name</label> <input id=“full_name” name=“full_name” required> </li>
  • 78. FALLING IN LOVE WITH FORMS Control Group Classification <li class=“email”> <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required aria-describedby=“email-note”> <em class=“note” id=“email-note”> We will only use your email address to respond to your message. </em> </li>
  • 79. FALLING IN LOVE WITH FORMS Control Group Classification <li class=“select”> <label for=“subject”>Purpose of Your Message</label> <select id="subject" name="subject"> <option>Question/Comment</option> <option>Article Error</option> <option>Website Bug Report</option> <option>Ask the Sherpas a question</option> </select> </li>
  • 80. FALLING IN LOVE WITH FORMS Control Group Classification <li class=“textarea”> <label for=“message”>Your Message</label> <textarea id="message" name=“message"></textarea> </li>
  • 81. FALLING IN LOVE WITH FORMS Control Group Classification <li class=“buttons”> <button type=“submit”>Send My Message</button> </li>
  • 82. Makes sense. What about more complex form constructs?
  • 83. FALLING IN LOVE WITH FORMS Pattern 3: Confirmations <input type=“checkbox” name=“newsletter” value=“yes”> Sign me up for this newsletter
  • 84. FALLING IN LOVE WITH FORMS Pattern 3: Confirmations <input type=“checkbox” name=“newsletter” value=“yes” id=“newsletter”> <label for=“newsletter”>Sign me up for this newsletter</label>
  • 85. FALLING IN LOVE WITH FORMS Pattern 3: Confirmations <label> <input type=“checkbox” name=“newsletter” value=“yes”> Sign me up for this newsletter </label>
  • 86. FALLING IN LOVE WITH FORMS Pattern 3: Confirmations input { /* Styles for most normal input types */ } label input { /* Styles for checkbox and radio controls */ }
  • 87. FALLING IN LOVE WITH FORMS Pattern 3: Confirmations <label for=“newsletter”> <input type=“checkbox” name=“newsletter” value=“yes” id=“newsletter”> Sign me up for this newsletter </label>
  • 88. FALLING IN LOVE WITH FORMS Pattern 4: Multiple Choice Tablets (9 available) <label for="asus-nexus-7"> <input type="checkbox" name="device[]" id=“asus-nexus-7"> Asus Nexus 7 </label> <!-- more options -->
  • 89. FALLING IN LOVE WITH FORMS Pattern 4: Multiple Choice Tablets (8 available) <ul> <li><!-- Asus Nexus 7 --></li> <!-- more options --> </ul>
  • 90. FALLING IN LOVE WITH FORMS Pattern 4: Multiple Choice <fieldset> <legend>Tablets (9 available)</legend> <ul> <li><!-- Asus Nexus 7 --></li> <!-- more options --> </ul> </fieldset>
  • 91. FALLING IN LOVE WITH FORMS Pattern 4: Multiple Choice <fieldset> <legend>Tablets <em>(9 available)</em></legend> <ul> <li><!-- Asus Nexus 7 --></li> <!-- more options --> </ul> </fieldset>
  • 92. FALLING IN LOVE WITH FORMS Pattern 4: Multiple Choice <li class=“grouped checkboxes”> <fieldset> <legend>Tablets <em>(9 available)</em></legend> <ul> <li><!-- Asus Nexus 7 --></li> <!-- more options --> </ul> </fieldset> </li>
  • 93. FALLING IN LOVE WITH FORMS Pattern 5: Related Entry Requested Day and Time <label for="requested_date">Requested Day</label> <select id=“requested_date" name=“requested_date" required=“”> <!-- options —> </select> <label for="requested_time">Requested Time</label> <select id="requested_time" name=“requested_time" required=""> <!-- options —> </select>
  • 94. FALLING IN LOVE WITH FORMS Pattern 5: Related Entry <fieldset> <legend>Requested Day and Time</legend> <label for="requested_date">Requested Day</label> <select id=“requested_date" name="requested_date" required=“”><!-- options --></select> <label for="requested_time">Requested Time</label> <select id="requested_time" name=“requested_time" required=""> <!-- options --></select> </fieldset>
  • 95. FALLING IN LOVE WITH FORMS Pattern 5: Related Entry <li class=“grouped date-time-selects”> <fieldset> <legend>Requested Day and Time</legend> <label for="requested_date">Requested Day</label> <select id=“requested_date" name="requested_date" required=“”><!-- options --></select> <!-- continued… --> </fieldset> </li>
  • 96. FALLING IN LOVE WITH FORMS Pattern 5: Related Entry /* Hide the labels in an accessible way */ form .date-time-selects label { position: absolute; height: 1px; width: 1px; overflow: hidden; clip: rect(1px 1px 1px 1px); /* IE6 & IE7 */ clip: rect(1px, 1px, 1px, 1px); }
  • 97. HELPFUL HINT Focus on
 making the form read naturally and easily.
  • 98. HELPFUL HINT You can’t always make an interface perfect, but you can make it usable.
  • 99. Ok, I think I’m getting it, but
 small screens still
 scare me a little.
  • 100. FALLING IN LOVE WITH FORMS Tap-friendly hit targets .confirm label, .radios label, .checkboxes label { margin: -1em 0; padding: 1em 0; }
  • 101. FALLING IN LOVE WITH FORMS Tap-friendly hit targets .confirm label, .radios label, .checkboxes label { margin: -1em 0; padding: 1em 0; }
  • 102. FALLING IN LOVE WITH FORMS No layout before its time .form-control { clear: both; } .form-control label, .form-control input { float: left; width: 34%; } .form-control input { width: 63%; }
  • 103. FALLING IN LOVE WITH FORMS No layout before its time .form-control label, .form-control input { display: block; margin-bottom: .328em; }
  • 104. FALLING IN LOVE WITH FORMS No layout before its time .form-control label, .form-control input { display: block; margin-bottom: .328em; } @media only screen and (min-width: 60em) { /* Side by Side layout */ } YMQMV
  • 105. FALLING IN LOVE WITH FORMS No layout before its time @media only screen and (min-width:30em) { form .grouped ul li { float: left; width: 50%; } } YMQMV
  • 106. Makes sense. Could we talk a bit
 about validation?
  • 107. FALLING IN LOVE WITH FORMS Requiring a field <p>Fields marked with a * are required.</p> <p> <label for=“first_name"> First Name <abbr title=“required">*</abbr> </label> <input id="first_name" name="first_name" required> </p>
  • 108. FALLING IN LOVE WITH FORMS Requiring a field <p>Fields marked with a * are required.</p> <p> <label for=“first_name"> First Name <abbr title=“required">*</abbr> </label> <input id="first_name" name="first_name" required> </p>
  • 109. FALLING IN LOVE WITH FORMS Requiring a field <p>Fields marked with a * are <strong id="required">required</strong>.</p> <p> <label for=“first_name"> First Name <abbr title=“required” aria-labelledby=“required”>*</abbr> </label> <input id="first_name" name="first_name" required> </p>
  • 110. FALLING IN LOVE WITH FORMS Requiring a field <p tabindex="0">Fields marked with a * are required.</p> <p> <label for=“first_name"> First Name <abbr title=“required">*</abbr> </label> <input id="first_name" name="first_name" required aria-required="true"> </p>
  • 111. HELPFUL HINT Focus on
 making the form read naturally and easily.
  • 112. FALLING IN LOVE WITH FORMS Native validation <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required> We will only use your email address to respond to your message.
  • 113. FALLING IN LOVE WITH FORMS Non-native format validation <label for="test">What is 1 + 1?</label> <input id="test" type=“number" name=“test” pattern=“[0-9]*” >
  • 114. FALLING IN LOVE WITH FORMS Non-native format validation <label for=“test">Enter three numbers followed by two letters</label> <input id="test" name=“test” placeholder=“e.g. 123ab” pattern=“d{3}[a-zA-Z]{2}” >
  • 115. HELPFUL HINT Don’t forget about server-side validation either.
  • 116. FALLING IN LOVE WITH FORMS Provide a list of errors retreats4geeks.com/contact
  • 117. FALLING IN LOVE WITH FORMS Provide a list of errors <div role=“alert”> <p>There were errors with your form submission:</p> <ol> <li><a href="#message">Message</a> is a required field</li> <li><a href="#name">Name</a> is a required field</li> <li><a href="#email">Email</a> is a required field</li> </ol> </div>
  • 118. FALLING IN LOVE WITH FORMS Provide easy access to them <div role=“alert”> <p>There were errors with your form submission:</p> <ol> <li><a href="#message">Message</a> is a required field</li> <li><a href="#name">Name</a> is a required field</li> <li><a href="#email">Email</a> is a required field</li> </ol> </div>
  • 119. FALLING IN LOVE WITH FORMS Provide easy access to them <label for=“message”> Message <abbr title=“required">*</abbr> </label> <textarea id="message" name="message" required></textarea>
  • 120. FALLING IN LOVE WITH FORMS Provide field-level help <li class="text validation-error"> <label for=“email”>Your Email <abbr title=“required">*</abbr> </label> <input id="email" type="email" name="email" required=“" aria-required=“true” aria-invalid="true" aria-describedby=“email-error" > <strong id="email-error" class=“validation-error-message"> Your email address is required</strong> </li>
  • 121. FALLING IN LOVE WITH FORMS Provide field-level help li.validation-error { color: #922026; } li.validation-error input, li.validation-error textarea, li.validation-error select { border-color: #922026; }
  • 122. FALLING IN LOVE WITH FORMS Provide field-level help .validation-error label::before { content: “x "; font-family: Verdana, sans-serif; speak: none; /* The future! */ }
  • 123. FALLING IN LOVE WITH FORMS Provide field-level help .validation-error label::before { content: “Please Enter "; font-family: Verdana, sans-serif; }
  • 128. Forms can be… easy to build predictable effortless to use and accessible