=================================================================== RCS file: /cvs/cvs/draft/form.min.js,v retrieving revision 1.65 retrieving revision 1.72 diff -u -p -r1.65 -r1.72 --- draft/form.min.js 2024/03/30 16:16:46 1.65 +++ draft/form.min.js 2024/03/30 18:13:27 1.72 @@ -26,7 +26,7 @@ async function sendData() { ii.textContent="One or more fields have an error. Please check and try again."; } else { var fc = document.querySelectorAll(".wpcf7-form-control"); - ii.textContent="All good."; + ii.textContent="Please wait..."; fc.forEach((f) => { f.disabled=true; l=f; @@ -40,12 +40,12 @@ async function sendData() { retry: 'never', 'error-callback': function(e) { turnstile.remove(); + ii.textContent="Cloudflare Turnstile verification error. Try again later." }, callback: function(token) { - ii.textContent="Sent"; - console.log(`Challenge Success ${token}`); const dataToSend = JSON.stringify({"add": em, "sub": su, "msg": ms, "tok": token}); - console.log(`JSON: ${dataToSend}`); +// console.log(`JSON: ${dataToSend}`); + ii.textContent="Sending..."; @@ -57,10 +57,11 @@ fetch("/feedbk/", { body: dataToSend }) .then(response => response.json()) - .then(json => console.log(json)) +// .then(json => console.log(json)) + .then(json => ii.textContent=json['msg']) - +// ii.textContent=json['msg'];