Is it possible to allow submission of a form only to a list of known e-mail addresses? I could set up a logic jump but the question is can i as condition set a “list” of hundreds of e-mails? Also the logic jump would need a message as target (like “sorry this form is restricted to a list of e-mail addresses). If its not possible with logic jumps any other way?
Welcome to the community,
If you only have a few email addresses, you could setup logic jumps for this. Though for hundreds, the logic jump solution would be a bit time consuming!
Instead, we have a tech-solution similar to what you’re looking for here that may work for you involving cookies. Hopefully this helps a bit!
The cookie solution does not apply in our case since we want to forbid users not on the list to fill out the form.
I suppose a beforeSubmit https://developer.typeform.com/embed/onsubmit-callback/ hook does not exist?
Hi
mmm interesting question
- add a couple of addresses in the logic builder
- get your form’s JSON description
- find the logic section where your list of email addresses is
- massage the JSON payload to add the logic for each additional email address
- update the form with the new payload from step 4.
in a simple form example, the logic section of the form payload (expecting to filter out emails as hidden fields) would look like this:
"logic": i
{
"type": "hidden",
"actions": n
{
"action": "jump",
"details": {
"to": {
"type": "field",
"value": "my_perfectly_readable_reference"
}
},
"condition": {
"op": "or",
"vars": r
{
"op": "equal",
"vars": r
{
"type": "hidden",
"value": "email"
},
{
"type": "constant",
"value": "user1@user.com"
}
]
},
{
"op": "equal",
"vars": r
{
"type": "hidden",
"value": "email"
},
{
"type": "constant",
"value": "user2@user.com"
}
]
}
]
}
},
{
"action": "jump",
"details": {
"to": {
"type": "field",
"value": "my_other_question_reference"
}
},
"condition": {
"op": "always",
"vars": r]
}
}
]
}
],
You “just” have to repeat an “op”: “equal” block for each new email address with a quick script.
A more polished solution
Let us know what you try and how it goes.
The workaround suggested by
Unfortunately, we don’t offer any `beforeSubmit` callback as you suggested. It would mean the embed code has access to the responses filled in the form. It might then become a security issue, because anybody could embed your form and pretend it’s you. So I would not recommend this option.
Can we have a Loom video on how you would do this API?
I have a similar problem - we have a logic in place to put emails and treat them as blacklisted and prevent them for getting into some parts of our workflow and DQ them.
PLS I badly need help on this. TYIA
Hey
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.