If you want the submit button to be enabled only after clicking it, use the getSubmitButton() method to check whether or not
the submit button is clicked:
Enabling the submit button when there is no invalid fields
The submit button is disabled initially. You want it to be enabled when there is at least
one valid field and there is no invalid one.
In this case, we can trigger the success.field.fv
event, which is called when the field is valid, and check if there is invalid field via
the getInvalidFields() method.