Blocking submissions with personal email addresses is a useful way to reduce spam. Below are steps to achieve this in Webflow.
1. Use Custom Code with JavaScript
- Go to the page where your form is located and access the Page Settings in Webflow.
- In the Before Body Tag section, use custom JavaScript to validate email addresses against a list of personal domain providers like Gmail, Yahoo, etc.
- Use JavaScript's preventDefault() method to stop form submission if the validation fails.
2. Example Code Snippet (Inline)
- Use a simple inline approach: declare a JavaScript function that checks the form input value and blocks common email domains such as Gmail, Hotmail, etc.
- Assign this function to the form on submit event to ensure it runs before submission.
3. Form Settings Adjustments
- Even with the above code, make sure to have your Recaptcha enabled to further filter submissions.
- Set up email notifications to include sender details, so you can manually review submissions if needed.
4. Recaptcha and Honeypot
- Double-check that Recaptcha is correctly set up to avoid its failure leading to increased spam.
- Use Webflow's built-in Honeypot feature, which can help filter bots that bypass Recaptcha.
5. Regular Review and Update
- Periodically update the list of blocked domains in your script to account for new popular personal email services.
- Monitor your submissions for any patterns or bypass behaviors, and refine your JavaScript accordingly.
Summary
To prevent form submissions from personal email addresses in Webflow, use custom JavaScript in the Page Settings to validate email domains and employ Recaptcha alongside Webflow’s Honeypot. Regular updates and monitoring are crucial for maintaining efficiency in spam prevention.