Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7402945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:55:23+00:00 2026-05-29T04:55:23+00:00

Despite all of the buzz around html5 forms, it seems to me like you

  • 0

Despite all of the buzz around html5 forms, it seems to me like you are creating extra work, in most scenarios, by going this route.

Take, for example, a datepicker field. The native html5 implementation of this renders differently in every browser. In addition your polyfilled solution (jquery UI for instance), for a browser not supporting this feature, will also render differently.

Now, we have introduced multiple points of customization and maintenance for the same form, when we had a perfectly working and unified solution with jquery!

I’d love to hear about some real world experiences in this area, because I’m getting annoyed with all of the buzz!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:55:24+00:00Added an answer on May 29, 2026 at 4:55 am

    First of all I’m the creator of webshims lib (one of those polyfills, which isn’t maintained anymore). To answer your question:

    Is it worth creating a forms polyfill for a project?

    No, it is really hard to do this just for one project. Well, I have done it, simply because I want to use modern technologies.

    Is it worth using a forms polyfill like webshims lib for a project?

    Yes absolutely! And here is why:

    1. Nice standardized declarative Markup API

    After including webshims and scripting the following:

    //polyfill forms (constraint validation) and forms-ext (date, range etc.)    
    $.webshims.polyfill('forms forms-ext');
    

    You can simply write your widgets and your constraints into your form:

    <input type="date" />
    <input type="date" min="2012-10-11" max="2111-01-01" />
    <input type="range" disabled />
    <input type="email" required placeholder="Yo you can use a placeholder" />
    

    This will create 3 different widgets and each are configured differently. No extra JS needed just standardized, clean and lean code.

    2. Standardized DOM-API

    Same goes to the DOM API. Here are just two examples: Combining two date fields and combining a range field with a date field.

    3. works without JS in modern browsers

    Degrades gracefully in old browsers and works well in modern ones.

    4. Less file size in modern browsers

    Especially good for mobile (iOS 5, Blackberry have support for date for example)

    5. Better UX [mostly mobile]

    Better mobile UX (better input UI for touch, better performance, fits to the system), if you are using it: type="email", type="number" and type="date"/type="range"

    But still, what about customizability?

    I’m a developer in a bigger agency and you are absolutely right most clients and most designers won’t tolerate much differences, but I still want to use modern technologies, which means webshims lib can give you the best of both worlds.

    Customizing the constraint validation

    The polyfilling part

    //polyfill constraint validation
    $.webshims.polyfill('forms');
    

    Customizing the UI for the error-bubble:

    //on DOM-ready
    $(function(){
        $('form').bind('firstinvalid', function(e){ 
            //show the invalid alert for first invalid element 
            $.webshims.validityAlert.showFor( e.target ); 
            //prevent browser from showing native validation message 
            return false; 
        });
    });
    

    generates the following markup:

    <!-- the JS code above will generate the following custom styleable HTML markup for the validation alert -->
    <span class="validity-alert-wrapper" role="alert"> 
        <span class="validity-alert"> 
            <span class="va-arrow"><span class="va-arrow-box"></span></span> 
            <span class="va-box">Error message of the current field</span> 
        </span> 
    </span>
    

    Customizing the style of an invalid/valid form field:

    .form-ui-invalid {
        border-color: red;
    }
    
    .form-ui-valid {
        border-color: green;
    }
    

    Customizing the text of the validity alert:

    <input required data-errormessage="Hey this is required!!!" />
    

    And now, what’s the point:

    1. still works without JS
    2. modern browsers load only the customization code (3kb min/gzipped) and old browsers do load the additional API (about 13kb min/gzip) (forms include a lot more than just constraint validation API, for example there is also autofocus, placeholder, output and so on)

    And what is with your special example, customizing the datefield?

    No problem:

    //configure webshims to use customizable widget UI in all browsers
    $.webshims.setOptions('forms-ext', { 
        replaceUI: true
    });
    
    $.webshims.polyfill('forms forms-ext');
    

    And also here:

    1. still works without JS in modern browsers
    2. modern browsers only load the UI and the UI-API glue, but not the DOM-API (valueAsNumber, valueAsDate…)

    And now, here comes the best:

    //configure webshims to use customizable widget UI in all non mobile browsers, but a customizable one in all desktop and all non-capable mobile browsers
    $.webshims.setOptions('forms-ext', { 
        //oh, I know this is bad browser sniffing :-(
        replaceUI: !(/mobile|ipad|iphone|fennec|android/i.test(navigator.userAgent))
    });
    
    $.webshims.polyfill('forms forms-ext');
    
    1. less file size and a better UX for mobile browsers (most clients and most designers will love you for having a different UI in mobile!!!)
    2. still works without JS in modern browsers
    3. modern browsers only load the UI and the UI-API glue, but not the DOM-API (valueAsNumber, valueAsDate…)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Despite all the hype, in reality the HTML5 video tag has a bit of
Despite all known blogs about this issue i always doubt some results and my
Despite all my arguing in favor of web based, I'm being forced into creating
I'm trying to figure out how to do this programatically, but despite all of
Very occasionally, despite all testing efforts, I get hit with a bug report from
I lack understanding of some basic MVC concepts, despite all my searching. I created
I'm doing some research on the Groovy programming language, and despite all the information
Despite me working with C# ( Windows Forms ) for years, I'm having a
Despite working on EE for about 3 weeks now, believe it or not, this
This is a problem i wasn't able to solve despite extensive searches on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.