PHP Classes

File: htdocs/themes/xbootstrap5/examples/checkout/checkout.js

Recommend this page to a friend!
  Packages of Michael Beck   Xoops 2.5   htdocs/themes/xbootstrap5/examples/checkout/checkout.js   Download  
File: htdocs/themes/xbootstrap5/examples/checkout/checkout.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change:
Date: 1 month ago
Size: 559 bytes
 

Contents

Class file image Download
// Example starter JavaScript for disabling form submissions if there are invalid fields (() => { 'use strict' // Fetch all the forms we want to apply custom Bootstrap validation styles to const forms = document.querySelectorAll('.needs-validation') // Loop over them and prevent submission Array.from(forms).forEach(form => { form.addEventListener('submit', event => { if (!form.checkValidity()) { event.preventDefault() event.stopPropagation() } form.classList.add('was-validated') }, false) }) })()