I’m looking to create a form where the email address it’s submitted to changes dynamically based on the postal code entered by the user. In my case, all postal codes in the country are divided among 10 consultants. Depending on the postal code entered, the corresponding consultant should receive the email.
Is there a way to implement this logic in Webflow? Can I achieve this with custom JavaScript or is there a simpler method?
I’d appreciate any guidance or examples on how to set this up.
This will require a server-side build. Here’s how I’d personally build this.
Airtable- store the zip codes and the receiving consultant. This makes the list manageable and easily editable.
Make- receives the form submission, looks up the recipient in Airtable, and sends the email notification.
GMail or other, to send the email from Make.
In front of that, I typically prefer to use Basin ( paid service ). This ensures full control over SPAM, full visibility to SPAM flagged messages, and visibility over everything captured by the form. It will report everything for you to monitor, and pass on non-SPAM message for your special processing in Make.
A but of setup but you end up with a very flexible and polished service.
The central part, which is the email send itself, has to be done externally. Webflow doesn’t have a feature to support that.
The step where you look up the zip and determine who to send the notification to could be done in client-side code, but you’d be trading off security, spam checking, and some administrative conveniences.
If you did want to go that route, you’d just have to write your code to take the zip and return the appropriate email- I don’t know what that lookup entails, but client-side is certainly a possibility if you don’t mind exposing those emails to spambots.