2

I have an Html 5 form with input elements contains required constraint. A user can view this form in edit or view mode. Means, I am hiding the input controls if form is in view mode and showing span instead. There is a submit button. Whenever user click the submit button and form is in view mode then I will get,

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

I tried to show the form in edit mode during form submit event but I am getting this error prior to submit event invocation. How to fix this error? Is there any event just before validation happens?

Imran Qadir Baksh - Baloch
  • 32,612
  • 68
  • 179
  • 322

1 Answers1

2

Per user2909164's answer in this question, adding a novalidate attribute to the form should fix the issue:

<form name="myform" novalidate>
Community
  • 1
  • 1
user2540711yo
  • 526
  • 6
  • 11