I've applied the following javascript that I found in an older post to a checkbox variable and it works properly when you check/uncheck the box on a form in the process manually. When you manually check the box, the Reject button disappears. When you manually uncheck the box, the Approve button disappears and the Reject button appears.
However it doesn't automatically execute when the page first loads. On the page load, both buttons appear on the bottom of the screen even though the checkbox is not checked. I would like the Approve button hidden when the page first loads as the variable is always unchecked to begin with on the first form it appears on, but currently both buttons are showing. Any suggestions?
$(document).ready(function () { $("#q1").on("change", function() { if($('#Field1-0').is(':checked')) { $(".action-btn.Reject").hide(); $(".action-btn.Approve").show(); } else { $(".action-btn.Approve").hide(); $(".action-btn.Reject").show(); } }); });