Thank you for the suggestion.Sanford Whiteman Do you think it can under hundreds of Email domains ?
@Jay Jiang Can you elaborate on the solution ? Do I have to create a Json object and reference the domain from form fill to that and redirect on the basis of that.
an array will work, e.g. ["domain1.com","domain2.com","domain3.com"], in a text token like {{my.domainsList}}
example (take this as pseudo code)
MktoForms2.loadForm("//app-###.marketo.com", "###-###-###", ###, function(form) {
var domainsList = {{my.domainsList}};
form.onSuccess(function(values, followUpUrl) {
var vals = form.vals(),
email = vals.Email,
domain = email.replace(/.*@/, "");
if(domainsList.includes(domain)){
location.href = "/alternate-thankyou-page";
return false;
}
});
});
Thank you for the suggestion.Sanford Whiteman Do you think it can under hundreds of Email domains ?
Yes, although I won't deny the UI gets unwieldy.
There's nothing wrong with using an onSuccess listener if you don't care about disclosing the list.
.
I tried using the Advance URL thank you setting, however i was not able to include all domain in single if choice using (";" or "," ) separator do we have to create separate if choice for each domain i.e. 150 choices . You are correct we don't want to disclose the domains and also majority of the users are using IE.
I tried using the Advance URL thank you setting, however i was not able to include all domain in single if choice using (";" or "," )
The Advanced Thank You page, unfortunately, doesn't offer the same ease-of-use as the Visibility Rules page, though both are within the Form Editor module.
With VRs, you can use [Contains] and a regular expression. So not separated by ; or , but using the alternator | character as in
@example1.com$|@example2.com$|@example3.com$
which has the same result of matching multiple domains with one rule.
But with Advanced TY you need separate [Ends With] choices.
Jay's JS approach can easily be made to work w/IE and to do the case-insensitive match. But it will always reveal the domains if someone is curious.
I tried the method which you have mention and included the alternator with ending in regular expression however it is not working for us.
I was mentioning regex to say it doesn't work for Advanced Thank You even though it does work in other parts of Form Editor.
So how should i proceed in this case without exposing the domains and redirect the leads on the basis of domain using Advanced Thank you page ?
I used this in Advance Thank you page however leads are not getting redirected.
@example1.com$|@example2.com$|@example3.com$