Hi All,
I have written some serverless functionality that I am struggling with. So far the App coverage is 100% across the different sections. When I test the app in my instance my logs are showing up correctly and showing my functions are being called and tested properly.
The app however does not intercept the form submit.
Is anyone able to assist?
Here is some of the code I’m trying.
// Add event listener for button clicks and {hidden}
addEventListeners: function () {
document.addEventListener('DOMContentLoaded', function () {
const buttons = document.querySelectorAll('button[type="submit"]');
buttons.forEach(button => {
button.addEventListener('click', function (event) {
event.preventDefault(); // Prevent the default form submission
console.log('Button clicked');