I have a form set up with a custom redirect added into the embed code based off of the form entry. For some reason, this code is causing submissions from iPhones to not register in HubSpot. When I remove those lines of code, submissions go through. With the lines of code added in, submissions are registered from desktops, iPads, and Android phones, but not iPhones. Any reasons why this could be happening?
Here is the code:
<script charset=“utf-8” type=“text/javascript” src=“//js.hsforms.net/forms/embed/v2.js”></script>
<script>
hbspt.forms.create({
region: “na1”,
portalId: “40238620”,
formId: “3dfe8346-288f-43fe-bc84-e2b55d39f3f6”,
target: “.form-column”,
onFormSubmit: function($form) {
var choice = $form.find(‘input[name=desired_wedding_package]:checked’).val();
if (choice == ‘Best Weekend Ever’) {
window.location.href = ‘https://zionsprings.com/schedule-a-tour-date-time/’;
}
else if (choice == ‘Best Day Ever’){
window.location.href = ‘https://zionsprings.com/schedule-a-tour-date-time/’;
}
else if (choice == ‘Mini-mony’){
window.location.href = ‘https://zionsprings.com/book-elopement-meeting/’;
}
else if (choice == ‘Elopement’){
window.location.href = ‘https://zionsprings.com/book-elopement-meeting/’;
}
else if (choice == “I don’t know yet”){
window.location.href = ‘https://zionsprings.com/schedule-a-tour-date-time/’;
}
}
});
</script>