Hi Elly,
Here are my suggestions:
1. Only keep data-no-submit="true" attribute, remove data-ignore-prevent-default="true" attribute, because we only want to perform sendFormCaptureToCrm function by ourselves.
2. Check whether you have gotten checkbox elements correctly.
(Because you are using form capture, therefore, you can set a simple id name for the checkbox, e.g: id="email-allowed", in my form, I get all checkboxes with getElementById method)
3. Due to you are using document.querySelector('form') method, hence you could check whether there is only one form on page.
Code of my form capture:
Script:
(add alert function to monitor whether there is anything incorrect.)
function submitForm() {
var emailAllowed = document.getElementById("allow-email");
if (emailAllowed.checked) {
var form = document.getElementById("contactForm");
alert("Thank you for submission.");
MsCrmMkt.MsCrmFormLoader.sendFormCaptureToCrm(form);
} else {
alert("We can't send email to your if you don't allow email.");
}
}
Form element:
<form id="contactForm" onsubmit="submitForm()">
</form>
Page:

Regards,
Clofly