Email Form Submissions To The Submitter
In this tutorial, we’ll walk through how to automatically email a copy of a form submission to the person who submitted it, using Oncord’s Marketing Automation tools. This is commonly used for contact forms, event registrations, and enquiries where users expect a confirmation or record of their submission.
By the end of this guide, you’ll have a working automation that sends a confirmation email to the submitter as soon as a form is successfully submitted.
Prerequisites
Before starting this tutorial, make sure the Marketing feature is enabled on your project. Marketing Automation is required to create and send automated emails based on form submissions.
Create the form
Start by creating a form that collects the required user details. You can use an existing form or create a new one using the example below.
Add the following markup to your page:
Important
Take note of the following, as they’ll be used later:
- Form ID: form_cc
-
Field IDs:
- contact_first_name
- contact_last_name
- contact_email
- preferred_communication
- contact_phone
- contact_social
- message
Submit the form and get the generated form ID
Before the form can be used in Marketing Automation, it must have at least one submission.
- Fill in the form with test data
- Submit the form
- Confirm the success message appears
Next, retrieve the generated form ID value:
- Go to Pages > Forms
- Locate your form. In this example, it’s form_cc
- Click the form name
- Check the browser URL. The URL will contain the form_id value.
/admin/website/pages/forms/submissions/?form_id=32
Make a note of this form ID. You’ll need it when setting up the automation.
Create a new automation
Once the form is confirmed to be working, go to Marketing > Automation.
- Click New Automation
- Enter an Automation Title
- In the Upon Event dropdown, select Forms – When a form is submitted
A list of available form IDs will appear. Locate and select your form.
In this example, choose form_cc.
You’ll also see an option to configure And Submission Meets Conditions. This can be used to limit when the automation runs, but for this tutorial, we’ll skip this step.
Add the email action to the workflow
Scroll down to the Workflow section.
- From the dropdown, select Send E-mail to Customer
- Click Create New Message
This creates a new email message for the automation. Click Edit Message next to it to customise the email content.
The email editor will open in a new tab. Your automation setup is saved, so you can safely return to it later.
Create the email message for the submitter
In the email editor:
- Enter a Subject at the top
- Select your preferred Design
To insert the submitted form data:
- Click Source on the left panel
- Paste the following code into the editor:
Notes
- Replace 32 with your actual form ID
- The $submission[...] values must match the field IDs from your form
Save the email message once complete.
Enable and test the automation
Return to the Automation tab.
- Click Live Mode
- Tick Enable this Automation
- Click Save Automation
Submit the form again with test data and confirm that:
- The form submits successfully
- A copy of the submission is emailed to the submitter
Make any adjustments if needed. Once confirmed, your automation is ready and fully active.