Todd Anglin
  @toddanglin
@t oddanglin

VP HTML5 Web & Mobile Tools, Telerik
Microsoft MVP, ASP Insider, O'Reilly Author

   htmlui.com
   @htmlui
HTML5 forms & input:
learning goals
•   what’s available?
•   how do you use it?
•   how do you customize the
    default experience?
•   how do you make it work in
    older browsers?
TODAY

HTML FORMS
asdflkajfds
Enter your email: <input type="text" />
<input type="submit" value="Submit" />
In HTML4…
•   Everything’s a text box
•   Lots of JavaScript
<input type="_________" />



 text               checkbox
 password           radio
 hidden             submit
 file               reset
                    image
                    button

HTML4
Wouldn't it be nice if…
•   Browsers understood different
    data types
•   Browsers tailored input
    methods to data types
•   Browsers could do basic
    validation
FORMS
•   New input types
•   New rendering
•   New input features
    – EX: Placeholder Text, AutoFocus



      Backwards compatible!
<input type="_________" />



 text               checkbox
 password           radio
 hidden             submit
 file               reset
                    image
                    button

HTML4
<input type="_________" />



text       url         checkbox
password   search      radio
hidden     color       submit
file       number      reset
email      range       image
tel        datetime*   button

HTML5
HTML5 Mullet: Forms & Input Validation
State of the Browsers
(Mid 2012)



 A      B    A+    B+   B-

 21    11   11.6    6   9
HTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input Validation
OS X
HTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input Validation
[No unique keyboard for Date/Time]

    Chrome for Android improves the story,
but only available to fraction of Android users.
DEMO:
NEW INPUT TYPES
"Can I customize browser
   rendered input elements
    (like calendar or range
            slider)?"
             Nope. Not yet. Not really.




     Shadow DOM
input[type=range].custom::-webkit-slider-thumb
HTML5 Mullet: Forms & Input Validation
DEMO:
CUSTOMIZING SHADOW
DOM
asdflkajfds
Enter your email:
<input type="email" placeholder="Enter
your email" required title="Please
enter your email" />
<input type="submit" value="Submit" />
New Attributes
•   More control over input
    behavior
    – Still no JavaScript
    – Improved usability
                        – NoValidate
•   Attributes:         – FormNoValidate
    – Placeholder
                        – Accept
    – Autofocus
                        – Multiple
    – Max Length
                        – Min/Max
    – List
                        – Step
    – AutoComplete
    – Required
    – Pattern
DEMO:
NEW INPUT ATTRIBUTES
Validation
•   Handled by browser
    – Can be disabled via form
      novalidate
•   Saves JavaScript
    – Less to download = faster loading
      apps

    Does not replace server-
        side validation
3 Ways to Control Validation
Customizing validation HTML
 •   Change message
     – In Chrome, use input title attribute
       (Not FF, O, S)
 •   Pattern attribute
JavaScri
Validation API                      pt


  •   JavaScript for greater control


checkValidity() setCustomValidity()
CSS Styling for Validation CSS


  New states:
    valid       in-range
    invalid     out-of-range
    required    ready-only
    optional    write-only
DEMO:
CUSTOMIZING VALIDATION
Lowest common denominator?
       Including IE9?


     NOTHING.
        :(
HTML5 Mullet: Forms & Input Validation
Older Browsers
1.   Polyfill
2.   JavaScript fallbacks
DEMO:
POLYFILLING HTML5 FORMS
HTML5 Mullet: Forms & Input Validation
Please remember to complete and
     return your session eval forms.




@toddanglin | anglin@telerik.com

THANKS!

                          www.KendoUI.com

More Related Content

PPTX
Edge of the Web
PPTX
The Rich Standard: Getting Familiar with HTML5
PDF
HTML5 Introduction
PDF
Basics of css and xhtml
PDF
Up to Speed on HTML 5 and CSS 3
PDF
Intro to html 5
PPTX
Introduction to HTML5 and CSS3 (revised)
KEY
HTML5 Video Player - HTML5 Dev Conf 2012
Edge of the Web
The Rich Standard: Getting Familiar with HTML5
HTML5 Introduction
Basics of css and xhtml
Up to Speed on HTML 5 and CSS 3
Intro to html 5
Introduction to HTML5 and CSS3 (revised)
HTML5 Video Player - HTML5 Dev Conf 2012

What's hot (20)

PDF
An Introduction To HTML5
PDF
HTML5 and the dawn of rich mobile web applications
PDF
Dreamweaver CS6, jQuery, PhoneGap, mobile design
PDF
HTML5 JS APIs
PDF
Introduction to HTML5
PDF
HTML5 & Friends
ODP
PPTX
Getting Started with HTML5 in Tech Com (STC 2012)
PPTX
HTML5: An Overview
PDF
HTML5: features with examples
KEY
An Introduction to HTML5
PPTX
PDF
What the heck is HTML 5?
PDF
HTML5 Semantics, Accessibility & Forms [Carsonified HTML5 Online Conference]
PPTX
Html5 Basics
PPT
HTML5 CSS3 Basics
PPTX
Training HTML5 CSS3 Ilkom IPB
PDF
Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011
PDF
The Future of the Web: HTML5
PPTX
What is HTML 5?
An Introduction To HTML5
HTML5 and the dawn of rich mobile web applications
Dreamweaver CS6, jQuery, PhoneGap, mobile design
HTML5 JS APIs
Introduction to HTML5
HTML5 & Friends
Getting Started with HTML5 in Tech Com (STC 2012)
HTML5: An Overview
HTML5: features with examples
An Introduction to HTML5
What the heck is HTML 5?
HTML5 Semantics, Accessibility & Forms [Carsonified HTML5 Online Conference]
Html5 Basics
HTML5 CSS3 Basics
Training HTML5 CSS3 Ilkom IPB
Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011
The Future of the Web: HTML5
What is HTML 5?
Ad

Viewers also liked (20)

PPTX
Form Validation in JavaScript
PDF
A World of Talent: What Perennial NBA Contenders Teach Us About Collaboration
PPTX
Wpf Validation
PDF
JavaScript
PPT
Flex security
PPT
PDF
Business Interfaces using Virtual Objects, Visual-Force Forms and JavaScript
PPTX
Data validation
PPTX
02. input validation module v5
PPTX
Making HTML5 Work Everywhere
PPT
Building RESTful Applications with OData
PPTX
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
PPTX
Javascript validating form
PDF
Using HTML5 to Build Mobile Apps
PPT
Web forms and server side scripting
PPTX
Data validation in web applications
DOCX
Validation rule, validation text and input masks
PPTX
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
PPT
Regular Expressions
PDF
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
Form Validation in JavaScript
A World of Talent: What Perennial NBA Contenders Teach Us About Collaboration
Wpf Validation
JavaScript
Flex security
Business Interfaces using Virtual Objects, Visual-Force Forms and JavaScript
Data validation
02. input validation module v5
Making HTML5 Work Everywhere
Building RESTful Applications with OData
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Javascript validating form
Using HTML5 to Build Mobile Apps
Web forms and server side scripting
Data validation in web applications
Validation rule, validation text and input masks
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
Regular Expressions
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
Ad

Similar to HTML5 Mullet: Forms & Input Validation (20)

PDF
HTML5 Forms - KISS time - Fronteers
PPTX
HTML5 Forms OF DOOM
PPT
Lecture 3 _ html forms.ppt.This is a course outline of the Website design and...
PPTX
html 5 new form attribute
PPT
PPTX
Html5 inputs
PPTX
Web input forms.pptx
PPTX
Forms with html5
PPTX
Forms with html5 (1)
PDF
Html5 Forms in Squiz Matrix - Dave Letorey
PPTX
Html form tag
PPTX
HTML Forms: The HTML element represents a document section containing interac...
PPT
Web forms and html (lect 4)
PDF
PPTX
Html tables, forms and audio video
PPT
05 html-forms
PPT
20 html-forms
PPTX
HTML DAY 4 presentation for beginners friendly
KEY
HTML5 Form Validation
PPTX
HTML FORMS.pptx
HTML5 Forms - KISS time - Fronteers
HTML5 Forms OF DOOM
Lecture 3 _ html forms.ppt.This is a course outline of the Website design and...
html 5 new form attribute
Html5 inputs
Web input forms.pptx
Forms with html5
Forms with html5 (1)
Html5 Forms in Squiz Matrix - Dave Letorey
Html form tag
HTML Forms: The HTML element represents a document section containing interac...
Web forms and html (lect 4)
Html tables, forms and audio video
05 html-forms
20 html-forms
HTML DAY 4 presentation for beginners friendly
HTML5 Form Validation
HTML FORMS.pptx

More from Todd Anglin (9)

PPTX
Developing a Modern Mobile App Strategy
PPTX
5 Tips for Better JavaScript
PPTX
50in50: Resources for HTML5, CSS3, & JavaScript Developers
PPTX
HTML5 and CSS3 Techniques You Can Use Today
PPTX
HTML5 for Tablets and Mobile
PPTX
Doing More with LESS for CSS
PPT
Building a Testable Data Access Layer
PPTX
HTML5 and CSS3 Techniques You Can Use Today
PPTX
What’s New in ASP.NET 4
Developing a Modern Mobile App Strategy
5 Tips for Better JavaScript
50in50: Resources for HTML5, CSS3, & JavaScript Developers
HTML5 and CSS3 Techniques You Can Use Today
HTML5 for Tablets and Mobile
Doing More with LESS for CSS
Building a Testable Data Access Layer
HTML5 and CSS3 Techniques You Can Use Today
What’s New in ASP.NET 4

Recently uploaded (20)

DOCX
search engine optimization ppt fir known well about this
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PPTX
Build Your First AI Agent with UiPath.pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
STKI Israel Market Study 2025 version august
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Statistics on Ai - sourced from AIPRM.pdf
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
search engine optimization ppt fir known well about this
The influence of sentiment analysis in enhancing early warning system model f...
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
CloudStack 4.21: First Look Webinar slides
Benefits of Physical activity for teenagers.pptx
Developing a website for English-speaking practice to English as a foreign la...
Taming the Chaos: How to Turn Unstructured Data into Decisions
Zenith AI: Advanced Artificial Intelligence
OpenACC and Open Hackathons Monthly Highlights July 2025
Build Your First AI Agent with UiPath.pptx
NewMind AI Weekly Chronicles – August ’25 Week III
Improvisation in detection of pomegranate leaf disease using transfer learni...
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
Training Program for knowledge in solar cell and solar industry
STKI Israel Market Study 2025 version august
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Statistics on Ai - sourced from AIPRM.pdf
Custom Battery Pack Design Considerations for Performance and Safety
sustainability-14-14877-v2.pddhzftheheeeee
Convolutional neural network based encoder-decoder for efficient real-time ob...

HTML5 Mullet: Forms & Input Validation

Editor's Notes

  • #2: The HTML5 Mullet: Form Input and Validation Really, it ’s the HTML5 Reverse Mullet. Party in the front, business in the back. Most talk about HTML5 generally revolves around the fun and exciting technologies like Geolocation, Video, and the powerful styling CSS3 brings to the party. But how useful is HTML5 for business apps? HTML5 promises a number of new features in browsers that will make data entry and validation easier for developers and end-users. In this session, you will learn how HTML5 is helping business developers simplify working with data and input validation, and see practical techniques for leveraging these features across all browsers, old and new. You will learn: How to use HTML5 Forms and input validation Techniques for bridging the gap to older browsers that lack HTML5 How to customize the default browser HTML5 Forms experience
  • #3: Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #6: This HTML4 form would submit without hesitation, even though the input is clearly wrong. Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #7: Configuration for basic input example Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #9: http://www.w3.org/TR/html4/interact/forms.html#adef-type-INPUT The &quot;state of the art&quot; for forms in HTML4 Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #13: http://www.w3.org/TR/html4/interact/forms.html#adef-type-INPUT Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #14: There are 13 new input types Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #16: Browsers ultimately dictate the usability of HTML5 forms. Great overview available here: http://wufoo.com/html5/ This non-specific rating focuses on Desktop Browsers. Mobile browsers are a different story. Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #17: Most new types still render as a normal textbox Shown: IE9, FF11 LIVE TEST: http://jsbin.com/imonat Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #18: Chrome 21 (Mac) Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #19: Not only do renderings differ by browser, but by client Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #20: iOS varies the keyboard significantly on the iPhone depending on the input type Shown: iOS5 (not available in iOS4) Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #24: Android (4.0) also provides unique keyboards, but support is not nearly as extensive for HTML5 input types as iOS Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #26: Shadow DOM: http://glazkov.com/2011/01/14/what-the-heck-is-shadow-dom/ Example: input[type=range].custom::-webkit-slider-thumb { -webkit-appearance: none; background-color: Green; opacity: 0.5; width: 10px; height: 40px; } Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #33: Validation helps improve user experience. Fewer trips to the server if you can catch simple user mistakes on the client.
  • #35: By default, browser use RFC-compliant email validation Some types, like Telephone intentionally do not validate format http://stackoverflow.com/questions/5272433/html5-form-required-attribute-set-custom-validation-message http://jsfiddle.net/nfgfP/61/
  • #37: http://www.alistapart.com/articles/forward-thinking-form-validation/
  • #39: The common set of HTML5 Form features that work in all modern HTML5 browsers *Note that IE9 offers no HTML5 forms support Types Email, Tel, Url, Search, Number Attributes Placeholder, MaxLength, NoValidate, Autofocus Elements Output Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #40: Sad truth is that HTML5 forms support across all browsers is evolving slowly. BUT…that doesn&apos;t mean this is all for waste. We can use a couple of solutions to take advantage of new HTML5 forms syntax. Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #41: HTML5 Forms polyfill: https://github.com/ryanseddon/H5F OR Polyfill approach also gives you more control over rendering in browsers. Makes it useful in modern browsers, too.
  • #43: Baby Steps - HTML5 Forms support is not perfect today, but it is headed in the right direction Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #44: Visual Studio Live! Las Vegas 2011MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.