I have a form that has 2 single line fields. When the first field has a change, I need to check that fields value and make sure it is not null or empty. The second field needs to be checked when the page first loads to see if it has a value of 1. If field 1 has is note empty AND not null OR field 2 equals 1, then I need to show the submit button, else hide it. Here is the JavaScript I have created so far, but it is not working correctly. I am sure I am just missing something, but any help would be greatly appreciated.
//Hide Submit button var $submit = $('.Submit'); $submit.hide(); $("#Field78").on('change', function(){ if (($(this).val() != null && $(this).val() !="") || ($("#Field89").val() ="1")){ $submit.show(); } else { $submit.hide(); } });