consent posts as a JSON boolean (the checkbox's literal 'on' never reaches the webhook)

This commit is contained in:
2026-11-21 10:02:36 +01:00
parent cc77b242ae
commit 43d3420f74
+3
View File
@@ -123,6 +123,9 @@ const note = type === "founders" ? strings.form_founders_note : strings.form_hub
const data = new FormData(form);
const payload = {};
data.forEach((v, k) => { payload[k] = v; });
// consent as a JSON boolean (the Flow/CRM mapping expects true/false,
// not the checkbox's literal "on"; an unchecked box never arrives)
payload.consent = data.get("consent") === "on";
if (payload.website) return; // honeypot: pretend success, send nothing
if (capField && !payload.capabilities) payload.capabilities = capField.value;
button.disabled = true;