Hello from the Wix DevRel Team!
Try putting your onWixFormSubmitted() function call inside of the default onReady function like I did below:
let counter = 0;
$w.onReady(function () {
$w("#wixForms1").onWixFormSubmitted( (event) => {
counter++;
console.log(counter);
});
});
// export function button1_click(event) {
// console.log('clicked'); //the submit button is clicked
// }
This is working for me (and isn’t using the button1_click function at all, since Wix Forms handles that automatically)
Hope this helps!
Rob