Hello all!
First post and it’s a doozy… Been trying to figure this out for awhile and it may just be a Zapier limitation.
I’ve created a regular Landing page and Thank-you page for a Webinar Opt-in sequence. I’m currently capturing the Email and First Name on the Opt-in page and then wanting to capture the Phone Number inside a pop-up modal on the Thank-you page.
I’m currently using Zapier to handle the data passing to my CRM. And for Zapier, you MUST provide a Email to “Check for Duplicates”. Is there a way you can pass Zapier the email via LocalStorage?
As there is only one input (the phone number) I’m not able to pass the email within the form submission to check for duplicates… Has anyone run into this?
I’m currently passing a new FormData object with both “email” and “phone number” in the object and Zapier is still not detecting. Here is the code that IS WORKING.
After typing this out, maybe this is a question for a Zapier forum? Not sure… anything helps!
<script>
// page load
const formElem = document.querySelector('form');
const storedEmail = localStorage.getItem('email');
const popup = document.querySelector('.popup');
const phone = document.querySelector('#phone-number');
console.log(storedEmail);
formElem.addEventListener('submit', submitPhone);
function submitPhone(e) {
const formData = new FormData(formElem);
formData.append('email', storedEmail);
for (var value of formData.values()) {
console.log(value);
}
}
document.addEventListener('DOMContentLoaded', activatePopup);
function activatePopup() {
setTimeout(() => {
popup.classList.add('active');
}, 2500);
}
</script>