My user has just submitted a form and, based on the input they've just entered, a box is going to be checked by default like this:
<input type="checkbox" name="spanish_alert_yes" id="spanish_alert_yes" onchange="spanishAlertYes(
this)" value="Y" checked>
Here's a screenshot:
On the original form, I've got a little "interview" that's revealed in stages based on the way in which the user checks certain boxes. Should the user click on "yes" in response to the first question ("Will this Employer need a Spanish version and an English version? Check "yes" in the box to the right if you do..") , the "spanishAlertYes" function is triggered and it looks like this:
$('#submit_explanation').html("<br><div style=\"width:95%; margin:auto; text-align:center; border:1px solid #cccccc; border-radius:10pt; padding:10px;\">When you click on \"Submit,\" you will be creating the basic aesthetics of your user's landing page. From here, you'll be directed to another interface where you'll being creating the user's Landing Page experience in Spanish.</div>");
//if this isn't checked, should the user have proceeded past this point and then backtracks and unchecks this button, you need to uncheck and zero out every checkmark that may have been put in place
...and it works just fine when the user is starting off with a new form and a checkbox that isn't checked by default.
How can I code things so if a box that is checked by default is unchecked, my function will be triggered?