Triggering a contact form to send without clicking it

Hi,

As Wix doesn’t have an inbuilt notification system for when a user submits to your data collection, is it possible, for instance, to add some code to the “submit” button that triggers a contact form on the page to send email notification? This way I can have a hidden contact form on the page, and use this to get notified when the data collection is updated by a user. What I am trying to achieve is a notification when the data collection is updated.

Current code that doesn’t work:

export function button10_click(event) {
$w(‘#form1’).selectedIndex = 0();
}

Thank you in advance. Any feedback is appreciated.

Why not just use Wix Automations, simple, easy and no code needed on your page.
https://support.wix.com/en/ascend-by-wix/wix-automations
https://support.wix.com/en/article/creating-an-automation-for-a-wix-data-form-submission

Thanks for the tip, It seems that this only works if you’re using a standard wix form? I haven’t used any of those apps, Im using user input fields which are connect to a datacollection. I want to be notified when user submit to this collection. Can I use automation for that somehow?

@lillewill
Look at second link in previous reply, you can use Wix Data Form which is a user input form that you make up.

There are other options which will involve the use of code.

Like triggered emails.
https://support.wix.com/en/article/about-triggered-emails

Or send email on form submission through SendGrid.
https://support.wix.com/en/article/corvid-tutorial-sending-an-email-on-form-submission
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-send-email-with-the-sendgrid-rest-interface
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-send-email-with-the-sendgrid-npm-interface

Finally, another option would be to use tracking on your website.

Wix Site Monitoring.
https://www.wix.com/corvid/reference/site-monitoring.html
https://support.wix.com/en/article/corvid-about-site-monitoring

Or look at adding your own custom tracking event.
https://www.wix.com/corvid/reference/wix-window.html#trackEvent
https://www.wix.com/corvid/reference/wix-window.trackingParameters.html
https://www.wix.com/corvid/reference/wix-window.trackingParameters.html#CustomEvent
https://support.wix.com/en/article/about-tracking-tools-analytics
https://support.wix.com/en/marketing-tools-analytics/google-analytics
https://support.wix.com/en/marketing-tools-analytics/marketing-integrations-tracking

@givemeawhisky Thank you!