diff --git a/packages/webapp/src/pages/form/Render/CustomCode.tsx b/packages/webapp/src/pages/form/Render/CustomCode.tsx index 7c8815cc..b816f6cf 100644 --- a/packages/webapp/src/pages/form/Render/CustomCode.tsx +++ b/packages/webapp/src/pages/form/Render/CustomCode.tsx @@ -80,15 +80,6 @@ export const CustomCode = ({ form, query }: { form: FormModel; query: Record { - if (form.settings!.captchaKind === CaptchaKindEnum.GOOGLE_RECAPTCHA) { - const script = document.createElement('script'); - script.src = `https://www.google.com/recaptcha/api.js?render=${GOOGLE_RECAPTCHA_KEY}`; - script.async = true; - document.body.appendChild(script); - } - }, [form.settings!.captchaKind]); - return ( <> @@ -97,6 +88,13 @@ export const CustomCode = ({ form, query }: { form: FormModel; query: Record )} + {form.settings!.captchaKind === CaptchaKindEnum.GOOGLE_RECAPTCHA && ( +