Hi all,
I want to submit a form not just on the submit button press but via code in an event handler.
Is it possible to do something like
$w('#form1').submit()
$w('#wixForms1').submit() Or fire the form's submit button/event handler
$w('#submitbutton').submit()
$w('#submitbutton').click()
thanks,
Dave
Hi JD, Really appreciate your answer. I've done what you suggest and have the data saving to a dataset. The issue is the form itself doesn't submit, so an attached automation does not fire. Any ideas? I've googled for firing an automation from corvid but no luck. regards, Dave
import wixData from 'wix-data'; $w.onReady(() => { $w("#button").onClick(event => { let toSubmit = { name: $w("#input1").value, phone: $w("#input2").value, //etc... } wixData.insert("CollectionName", toSubmit); }) })