Triggering via email input field submission
Triggering via email input field submission
Connect Surface Form to External Email Input
To enable triggering a Surface Form popup from a form field containing an email input, follow these instructions:
Make sure that you have added the Surface Tag to your site before proceeding.
1. Add the HTML Form
Ensure your HTML form includes the surface-form-handler
class. This class is essential for identifying the form as one that triggers the Surface Form popup. Example:
Note: Add the
surface-form-handler
class to any external form that you want to use to trigger the Surface Form popup.
2. Modify the Surface Form Embedding Script
Modify the Surface Form Embedding Script to include the data-question-id
attribute.
Note: You must replace the
<question_id>
withindata-question-id
attribute below with the question ID from the Surface Form Builder.
3. Test Your Integration
- Enter a valid email in the input field and press “Submit” or hit “Enter”.
- Verify that the Surface Form popup is displayed as expected.
Now you should be able to trigger a Surface Form popup from an external email input field!