I have added some JavaScript to my form that we use on other forms of ours and now the submit button on the form will not work. I have been playing around with syntax for a while and cannot come up with what I did wrong or missed.
The code we have added essentially allows us to use the same form on multiple steps and hide fields on the steps we do not want them to appear on. We have used this code on other forms processes and not had these issues. Here is the specific code we are using:
$(document).ready(function(){
$('#q45').hide(); //hide the custom html for stepname
function handle_review_sections() {
//first hide them all
$('#q35').hide();
$('#q40').hide();
$('#q50').hide();
//now show the one that we need to based upon the step name from the custom HTML
switch ($('#steptag').html()) {
case "Contract Submission Revision": //needs to be the stepname
$('#q35').show();
$('#q40').show();
$('#q50').show();
break;
};
}
handle_review_sections()
})
As I am not strong in JS, can someone help me with what I am missing?
Thank you,
Jason