hbspt.forms.create({
portalId: “263750”,
formId: “6338d928-2466-4b61-9955-b504f67048f6”,
region: “na2”,
target: “#hubspot-form-container”,
// Fires AFTER the submission has actually persisted in HubSpot — safe to redirect here
onFormSubmitted: function($form, data) {
// data.submissionValues is keyed by internal field name
var selectedValue = data.submissionValues[’employer_vs_employee’];
// Option A: Redirect to Landing Page 1
if (selectedValue === “I’m interested in offering Access Perks to my people.”) {
window.location.href = “https://accessperks.com/your-landing-page-1”;
}
// Option D: Redirect to Thank You Landing Page
else if (selectedValue === “Other”) {
window.location.href = “https://accessperks.com/ppc-thank-you”;
}
// Options B & C (“Access Perks member” & “Offer product/service”)
// fall through and stay on page — HubSpot’s inline thank-you message shows.
}
});