I have a form.
The form has inputs and number fields.
I want to check for every gesture that the fields are filled in so I can enable/disable the submit button.
I tried with keydown
/up
but that doesn’t help with the number fields.
I tried with onchange
which generally works but I have weird effects like you have to click outside the input to trigger the event or if you fill in the fields and then delete one they are not rechecked so you can click the submit button without the form being properly filled in.
No I can’t use ‘required’ because I’m not actually submitting the form — it’s all through js
2
Answers
Use input: Only ones not triggering
input
are the buttonsYou CAN use required
I hope this is helpful
Check each one if you want:
If you want check all
Also you can set
onclick
on submit button and call your validation function and after that submit form with your own code