Last active
December 30, 2015 08:29
-
-
Save morshedalam/1cb0903abb9e3d1ca0ff to your computer and use it in GitHub Desktop.
Remove form field with empty value on submit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var disableEmptyFormField = function (ele){ | |
| ele.find('input,select').each(function () { | |
| if ($(this).val() == '') { | |
| $(this).attr("disabled", "disabled"); | |
| } | |
| }); | |
| ele.find('button').attr("disabled", "disabled"); | |
| $('.filter-manufacturers input[type="checkbox"]').removeAttr('checked'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment