diff --git a/assets/js/bestellformular.js b/assets/js/bestellformular.js index 820830e..0debab5 100644 --- a/assets/js/bestellformular.js +++ b/assets/js/bestellformular.js @@ -17,11 +17,13 @@ window.onload = function () { document.getElementById('formular').addEventListener('submit', function (e) { e.preventDefault(); // Verhindert die Standard-Formularsendung + var honeyPot = document.getElementById("verify_email").value; + var endTime = Date.now(); var timeSpent = (endTime - startTime) / 1000; // Zeit in Sekunden document.getElementById("age").value = timeSpent; - document.getElementById("hobbies").value = userInteracted ? "1" : "0"; + document.getElementById("hobbies").value = userInteracted ? "true" : "false"; const form = e.target; const zsrNummer = form.elements['zsr_nummer'].value; @@ -39,6 +41,12 @@ window.onload = function () { const data = new FormData(form); const notification = document.getElementById('notification'); const btn = document.getElementById('bestellformular-btn'); + console.log("userInteracted: " + userInteracted); + console.log("timeSpent: " + timeSpent); + console.log("hobbies: " + document.getElementById("hobbies").value); + console.log("age: " + document.getElementById("age").value); + console.log("verify_email: " + honeyPot); + fetch(form.action, { method: 'POST', mode: 'cors', diff --git a/content/german/bestellung/freiberufliche.md b/content/german/bestellung/freiberufliche.md index 8cd0ee8..5e05a40 100644 --- a/content/german/bestellung/freiberufliche.md +++ b/content/german/bestellung/freiberufliche.md @@ -46,16 +46,14 @@ title = 'Freiberufliche'