Skip to content
Advertisement

Loading spinner disables HTML5 required attribute

I have submit button (bootstrap) where i submit some data from input fields to my PHP query. I have added to this submit button a loading spinner after the button has been clicked by the user. Since i have added the spinner id to the button the HTML attribute for “required” is not longer working. It does not indicate the user a missing information anymore.

Example:

JavaScript
JavaScript

Advertisement

Answer

Perhaps you should listen the submit event instead of click?

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement