how do you open a dialog in a validation checkbox?

(function () {
'use strict'

window.addEventListener('load', function () {
var forms = document.getElementsByClassName('needs-validation')

Array.prototype.filter.call(forms, function (form) {
  form.addEventListener('submit', function (event) {
    if (form.checkValidity() === false) {
      event.preventDefault()
      event.stopPropagation()
    } else {
      dialogOpen();  
    }

    form.classList.add('was-validated')
  }, false)
})
 }, false)
})()

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top