Exclude certain emails from being captured by forms

I would like to exclude certain mail servers from being captured by the webflow form. Is there a way to do this in form settings?

Not very descriptive. Are you meaning certain emails domain names? I doubt that functionality is available through WebFlow. Would probably be something you could filter through a 3rd party service (i.e. Zapier) for notifications I’m guessing. Or have more control using a 3rd party Forms might give you more options.

I’m others will chime in with other ideas as well, or correct my thought that WebFlow doesn’t provide this ability.

Sorry for not being specific and thanks for the reply. Yes I mean to exclude certain email domains for example gmail.com. Would there be a way to do this using custom code?

As I understand it, not with WebFlow(they are a pretty basic form) but I could be wrong. Pretty sure you’ll need some 3rd party form to get that granular level of control.

Thanks @DragonDon! maybe adding some php or JS will do it. Does anyone have any knowledge on this ?

This script will prevent users from typing emails with domains gmail.com and hotmail.com, from the textfield that has an ID of email:

<script>
var Webflow = Webflow || [];
Webflow.push(function() {
  $('#email').on('blur', function() {
    this.value = this.value.replace(/(gmail|yahoo).com\s*$/, '');
  });
});
</script>

Paste this in Page Settings > Code > Footer Code and modify accordingly.

2 Likes

Thanks samliew! that worked great!

This topic was automatically closed after 60 days. New replies are no longer allowed.