In Chrome my submit button isn't getting disabled and in IE it gets disabled but doesn't get enabled when the form is valid. Looking at nod.js it seems that the submitBtn.disabled = is likely to be a problem.
function toggleSubmit () {
if (configuration.submit && configuration.disableSubmit) {
nod.getElements(configuration.submit).forEach(function (submitBtn) {
submitBtn.disabled = !areAll(nod.constants.VALID);
});
}
}
If the submitBtn is a jQuery element then the disabled attribute should be set with submitBtn.prop( "disabled", true ); and if it's a standard dom element it should be submitBtn.setAttribute("disabled", "true");.
UPDATE
Turns out this is due to the fat that my form is using an a tag for the submit button rather than an actual button. (it's an old JSF app that uses a commandLink to submit the form).
It would be good if nod could disable the element that is specified using the submit option regardless of whether it's a button tag or not.
In Chrome my submit button isn't getting disabled and in IE it gets disabled but doesn't get enabled when the form is valid. Looking at nod.js it seems that the
submitBtn.disabled =
is likely to be a problem.If the submitBtn is a jQuery element then the disabled attribute should be set with
submitBtn.prop( "disabled", true );
and if it's a standard dom element it should besubmitBtn.setAttribute("disabled", "true");
.UPDATE
Turns out this is due to the fat that my form is using an a tag for the submit button rather than an actual button. (it's an old JSF app that uses a commandLink to submit the form).
It would be good if nod could disable the element that is specified using the submit option regardless of whether it's a button tag or not.