Goal: Hide the submit button until value of Field46 = 0.0
Field46 gets its value from the SUM of two other fields. If Field46 is not 0.0, I want the user to modify one of the values in the other field until Field46 changes to 0.0
This is working.
What I cannot get working, is for the submit button to appear after the above has occurred. I struggle to follow the logic of code, but I am trying. I copied and slightly modified the following that I found during my research and was hoping someone could direct me as to finish the process.
I am guessing that perhaps the code needs to run again on some function of the page, but I am unsure.
$(document).ready(function() {
//cache the elements we will use
var $submit = $('.Submit');
var $Field46 = $('#Field46');
//hide the submit button
$submit.hide();
//bind event handler to the field
$Field46.change(function() {
//if the user selects what we want, show the submit button
if ($Field46.find(':selected').val() === "0.0"){
$submit.show();
}
//if not, hide it
else {
$submit.hide();
}
});
});