Hi @mathava
Quick question… why are you checking specifically whether their email is @gmail.com? Are you doing something different with those email addresses? I would have thought you’d want to check if the email already exists regardless of whether it’s a gmail address or not?
So to answer your questions…
-
Use the Validator action in your API
Check if a Database Record Already Exists Before Inserting a New Entry -
Make your two fields required in your form. Also do this with your API actions (the POST fields in Input).
-
Convert your form to a Server Connect form. This will then let you select the API you want it to post to.
-
In your database table, add two fields - one to store a random string (UUID is perfect for this) and the other to store a boolean which says whether it’s been validated or not. Then, when the form is processed, send an email to the email address containing a link which has their email (or record id) in it as well as the random string. They click the link which runs another API script which retrieves the record matching the data and updates the validated field to 1.
Then, you will only make use of the records which have been validated.
I hope all that helps you in the right direction.