Although it is not best practice, some form builders output code that doesn’t use the traditional submit method. If your form is being submitted but events are not being created in Evidence this advanced form submission capture method may work for you.
Form Submission Overview
Evidence offers three different methods for detecting when a form has been submitted so events can be captured and displayed via notifications.
- Method #1: When a form is submitted. This method works for most forms and is the default method for capturing form submissions.
- Method #2: When a button within the form is clicked. Because some form builders use non-traditional methods to submit the form this method detects when the button is clicked. Try this method if Method #1 does not create an event in Evidence when the form is submitted.
- Method #3 (advanced): When a div with a specific class is clicked. This method is advanced and should only be used if Method #1 & Method #2 have been unsuccessful. There are several reason why this method might be your best option. Below we will outline how to setup this form submission method.
Configure Method #3
Setup your webform source by following the instructions here.
Scroll to the bottom of the source settings and click on the “SELECT FORM LISTENER” dropdown.
Click on the “Area is clicked (div)” option.
Next, enter the class of the div that is clicked when someone submits a form entry. To do this we suggest using the Chrome browser.
Right click on the form submit button and click “Inspect” in the menu.
This will open the Chrome inspect element tool and highlight the submit button. In the inspect element check if the form submit button is a div itself or is contained within a div.
Either the div containing the submit button or the div button itself should have at least one class. This class is what needs to be entered in Evidence source settings.
Type the div class in the “Type Div Class(es)” field.
Save & publish your changes.
Now it’s time to test the form submission and make sure submissions are being captured by Evidence.