to detect source
This commit is contained in:
@@ -47,16 +47,23 @@ const SignUpPage: NextPage<InitialProps> = ({ initialForm }) => {
|
||||
}
|
||||
|
||||
const onSubmit = async ({ formData }: ISubmitEvent<string>) => {
|
||||
|
||||
//for bot detection
|
||||
|
||||
if (honeypot !== "") {
|
||||
console.log("bot cought in honeypot cought lacking");
|
||||
toast.success("Sign-up submitted successfully 😎");
|
||||
return;
|
||||
}
|
||||
const trackedForm = {
|
||||
...formData,
|
||||
_source: "from the webs submit"
|
||||
};
|
||||
|
||||
const payload: Signup = {
|
||||
submit_id: SUBMIT_ID, // This is for preventing duplicate requests; NOT RELATED TO THE SIGNUP ID IN DATABASE
|
||||
signupForm_id: signupForm.id,
|
||||
answer: formData,
|
||||
answer: trackedForm,
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user