3

I can't get Google Chrome to submit my form. It's getting pretty ridiculous. It ends up focusing a random form field (but it's the same one every time) instead.

No issues with FF or IE...

Two of the errors Chrome gives me in developer tools are:

An invalid form control with name='state' is not focusable.
An invalid form control with name='unitName' is not focusable.

BUT, these aren't even the one field that chrome is deciding to focus on. I'm at a loss, any one had any experience like this??

Jonah
  • 9,991
  • 5
  • 45
  • 79
Shackrock
  • 4,601
  • 10
  • 48
  • 74

3 Answers3

5

I had this exact problem with an input field marked "required" that was made invisible via javascript. Chrome could not display "please fill out this field" so it said An invalid form control with name='description' is not focusable in the console.

  • Same here. Found similar question here: http://stackoverflow.com/questions/7168645/invalid-form-control-only-in-google-chrome – Kevin Tighe Feb 25 '13 at 13:19
  • Has anyone got code that can catch this error so we can handle it in Javascript? can't exactly wrap a try{} block around a form submission! – hood Jul 10 '13 at 03:44
4

Without seeing the HTML, here's what a little Google'ing turned up:

The root of the problem appears to be assigning a maxlength attribute to a form field that is automatically populated by the browser, with a value that is longer than the maxlength limit.

no.good.at.coding
  • 20,221
  • 2
  • 60
  • 51
1

I just had a similar problem, and for me, the fix was adding type="button" into my <button> tag.

caleb
  • 2,687
  • 30
  • 25