bootstrap-validator icon indicating copy to clipboard operation
bootstrap-validator copied to clipboard

need ability to specify buttons that should/shouldn't be disabled

Open bkdotcom opened this issue 10 years ago • 3 comments

options:

disable: boolean, true, Disable the submit button until the form is valid and all required fields are complete.

I have a form with <input type="submit" value="update"> and a <button type="submit">Cancel</button> (effectively two submit buttons) The "update" button requires all required fields to be valid. The "cancel" button should not. Both buttons are currently being disabled.

perhaps <button type="submit" data-allow-disable="false">Cancel</button> ?

bkdotcom avatar Apr 29 '15 16:04 bkdotcom

I'll second this one with the exact situation as bkdotcom. I'm unable to exclude the cancel button from being disabled which would seem to be a common scenario.

polomint82 avatar Sep 30 '15 18:09 polomint82

Can't you make the Cancel button a <button type="button">? It won't be disabled then.

1000hz avatar Sep 30 '15 18:09 1000hz

the formnovalidate attribute should be honored https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button

If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the novalidate attribute of the button's form owner.

bkdotcom avatar Aug 17 '17 16:08 bkdotcom