[whatwg] A mechanism to improve form autofill

Smylers Smylers at stripey.com
Thu Jul 26 01:52:23 PDT 2012

Maciej Stachowiak writes:

> On Jul 25, 2012, at 11:21 PM, Aryeh Gregor <ayg at aryeh.name> wrote:
> > I would also like to point out that this feature seems to overlap
> > with not only type="" (as has been pointed out), but inputmode="" as
> > well, and for that matter pattern="".  I think it would be quite
> > unfortunate if authors found themselves writing things like
> > 
> >  <input inputmode="numeric" pattern="\d{16}" autocompletetype="cc-num">
> > 
> > because that's logically pretty redundant.
> The specific combo of features you list is highly foreseeable.

Perhaps specifying certain autocomplete types could set defaults for
pattern and inputmode? So for this example autocomplete=cc-num would, if
pattern isn't specified, imply pattern=\d{16}, and equivalently for

> You may be right that there will be harder to predict scenarios.

By having the highly foreseeable cases merely be defaults for pattern
and inputmode, it allows anybody doing something less predictable to
still set those attributes explicitly.

The complicated cases would be possible, but wouldn't force redundancy
on the common cases.



More information about the whatwg mailing list