skip to Main Content

The "Update" button in WooCommerce Order page randomly stops working and throws the following error in console everytime I click on the button:

An invalid form control with name=” is not focusable.

I read online that it has to do with some hidden but required input fields and HTML5 validation rules. But I went through all the input tags in the source code of the page when the button was not working and didn’t find any such "hidden but required" input field.

I am looking for a quickfix right now, so is there anyway I can disable the browser from validating the form inputs, and allow the submit (Update) button to work always?

Any help would be highly appreciated.

2

Answers


  1. Chosen as BEST ANSWER

    Fixed it using this script:

    var badForms=document.querySelectorAll("form");
    for(var i=0;i<badForms.length;i++){
    badForms[i].setAttribute("novalidate","novalidate");
    }
    

  2. Yes, I have also come around this bug while exploring the orders page on woocommerce. So, the workaround would be to loop all the form tags and add novalidate to them.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search