Last active
September 18, 2020 18:24
-
-
Save denlunev/ec4c3d506ac5acf3c2e1705303e75134 to your computer and use it in GitHub Desktop.
Golf Forever - Form 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | |
<!--[if lte IE 8]> | |
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script> | |
<![endif]--> | |
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script> | |
<script> | |
hbspt.forms.create({ | |
portalId: "7363338", | |
formId: "fcf55c7a-bf85-45db-aadf-a2ac54f6ce8a", | |
onFormSubmit: function(data){ | |
var email = $(data).find("[name=email]").val(); | |
window.localStorage.setItem("df_email", email); | |
$.get("https://app.depositfix.com/proxy/v2/contact_lookup/" + email + "/7363338?formSubmissionMode=none&showListMemberships=false&propertyMode=value_only&property=gf_active_subscriptions", function(data){ | |
if(data.properties.gf_active_subscriptions && data.properties.gf_active_subscriptions.value){ | |
window.location = "https://members.golfforever.com/login"; | |
}else{ | |
window.location = "https://4269803.hs-sites.com/projectforever-2"; | |
} | |
}).fail(function(){ | |
window.location = "https://4269803.hs-sites.com/projectforever-2"; | |
}); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment