How to fix: Attribute autocomplete not allowed on element input at this point.

Most Likely Cause and Fix

Your HTML5 markup contains an <input> element with an autocomplete attribute that should not take this attribute.

The autocomplete attribute is allowed only on input elements with the type text, search, url, tel, e-mail, password, datetime, date, month, week, time, datetime-local, number, range, or color.

Use

<input type="button" … >
<input type="checkbox" … >
<input type="file" … >
<input type="hidden" … >
<input type="image" … >
<input type="radio" … >
<input type="reset" … >
<input type="submit" … >

instead of

<input type="button" autocomplete="on" … >
<input type="checkbox" autocomplete="on" … >
<input type="file" autocomplete="on" … >
<input type="hidden" autocomplete="on" … >
<input type="image" autocomplete="on" … >
<input type="radio" autocomplete="on" … >
<input type="reset" autocomplete="on" … >
<input type="submit" autocomplete="on" … >

What This Error Means

There is a defined set of attributes for each HTML element. You may choose to omit some but you cannot choose to add further attributes beyond those defined.

<img src="http://example.com/image.png" alt="Desc" />

This error is saying that in the context of <input autocomplete="value" />, the attribute autocomplete is not allowed.

How To Fix It

For the autocomplete attribute on input elements

The autocomplete attribute is allowed only on input elements with the type text, search, url, tel, e-mail, password, datetime, date, month, week, time, datetime-local, number, range, or color.

Use

<input type="button" … >
<input type="checkbox" … >
<input type="file" … >
<input type="hidden" … >
<input type="image" … >
<input type="radio" … >
<input type="reset" … >
<input type="submit" … >

instead of

<input type="button" autocomplete="on" … >
<input type="checkbox" autocomplete="on" … >
<input type="file" autocomplete="on" … >
<input type="hidden" autocomplete="on" … >
<input type="image" autocomplete="on" … >
<input type="radio" autocomplete="on" … >
<input type="reset" autocomplete="on" … >
<input type="submit" autocomplete="on" … >

In general

The specific error message you encountered will refer to a line and column number. This will guide you to the exact point in your markup to which the error relates.

Your markup contains a <input> element with a autocomplete attribute in the form <autocomplete input="value" />.

Attribute autocomplete is not allowed on element <input>.

Use

<input … />

instead of

<input autocomplete="value" … />

or consider using a HTML5 custom data attribute

<input data-autocomplete="value" … />

Discuss, Comment and Improve

Did this help you? Can this page be improved? Let us know!

comments powered by Disqus