TEST


<script>
    MsCrmMkt.MsCrmFormLoader.on("formSubmit", function(event) {
        console.log("form loaded");
        const checkboxes = document.querySelectorAll("div.marketing-subscription-list > input[type='checkbox']");
        const isChecked = Array.from(checkboxes).some(x => x.checked);
        
        console.log(isChecked);

        if (!isChecked) {
            event.preventDefault();
            console.log("subLists not checked");
            const divs = document.querySelectorAll("div.marketing-subscription-list");
            let p = document.createElement("p");
            p.textContent = "Bitte wählen Sie einen Newsletter aus.";
            p.style.color = "red";
            divs.forEach(element => {
                element.appendChild(p);
            });
        }
    })
</script>