AnsweredAssumed Answered

Need help on Javascript code to check all other boxes when you check a specific one

Question asked by Naveen Kumar on May 24, 2018
Latest reply on May 29, 2018 by Yanir Calisar

Hi All,

 

I am working on one of the form when we click on one specific checkbox other check boxes should be checked below is the screenshot.

 

My requirement is when we click on Receive All communications checkbox other check boxes will be checked except the unsubscribe checkbox that is available in the form in other section.

 

Below is the java script code i have used but its not working can any one help me on this

 

<script src="//app-sj11.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_idno"></form>

<script>MktoForms2.loadForm("//app-sj11.marketo.com", "", idno,function(form) {

    $("#recieve all communication id").change(function () {

        $("#subscriptionNewsletter id").prop('checked', $(this).prop("checked"));

    });

}););</script>

 

Thanks in Advance

Outcomes