to detect source

This commit is contained in:
jadera
2026-03-11 11:44:37 +02:00
parent ae28ec183e
commit 4c69a4620d
+8 -1
View File
@@ -47,16 +47,23 @@ const SignUpPage: NextPage<InitialProps> = ({ initialForm }) => {
} }
const onSubmit = async ({ formData }: ISubmitEvent<string>) => { const onSubmit = async ({ formData }: ISubmitEvent<string>) => {
//for bot detection
if (honeypot !== "") { if (honeypot !== "") {
console.log("bot cought in honeypot cought lacking"); console.log("bot cought in honeypot cought lacking");
toast.success("Sign-up submitted successfully 😎"); toast.success("Sign-up submitted successfully 😎");
return; return;
} }
const trackedForm = {
...formData,
_source: "from the webs submit"
};
const payload: Signup = { const payload: Signup = {
submit_id: SUBMIT_ID, // This is for preventing duplicate requests; NOT RELATED TO THE SIGNUP ID IN DATABASE submit_id: SUBMIT_ID, // This is for preventing duplicate requests; NOT RELATED TO THE SIGNUP ID IN DATABASE
signupForm_id: signupForm.id, signupForm_id: signupForm.id,
answer: formData, answer: trackedForm,
}; };
try { try {