# Custom captcha in an embedded form

**URL:** <https://community.hubspot.com/t/custom-captcha-in-an-embedded-form/86434>\
**Category:** APIs & Integrations\
**Tags:** forms\
**Created:** [July 31, 2023, 8:35am UTC](https://community.hubspot.com/t/custom-captcha-in-an-embedded-form/86434 "2023-07-31T08:35:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aravindsanal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aravindsanal/32/38114_2.png) [@aravindsanal](https://community.hubspot.com/u/aravindsanal)\
**Post date:** [July 31, 2023, 8:35am UTC](https://community.hubspot.com/t/custom-captcha-in-an-embedded-form/86434/1 "2023-07-31T08:35:42Z")

</div>

Do you have any suggestion how a custom captcha could be integrated with the embedded form? We were looking at [https://legacydocs.hubspot.com/docs/methods/forms/advanced\_form\_options](https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options) and thinking to use for example the _onBeforeFormSubmit_ function to verify that the custom captcha was completed before submitting the form. Do you believe something like this is feasible? Do you have any experience from peers doing similar things?

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [July 31, 2023, 11:44am UTC](https://community.hubspot.com/t/custom-captcha-in-an-embedded-form/86434/2 "2023-07-31T11:44:11Z")

</div>

Hi @aravindsanal ,

There are two ways I solved this problem;

1. Create a custom HTML form and do the validation there, use either the Form Submit API to submit the form or store the data in hidden inputs in a hidden HubSpot form.  
2. Add a required field in your form, you can name it whatever you want, hide that field with CSS or JavaScript, and after the captcha was completed, set a value in the hidden required input. Users can not submit the form as long as the input has no value. This is my preferred method.
