to detect source
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user