# Form Data Intercept

**URL:** <https://community.hubspot.com/t/form-data-intercept/11315>\
**Category:** APIs & Integrations\
**Tags:** forms\
**Created:** [July 18, 2018, 7:30pm UTC](https://community.hubspot.com/t/form-data-intercept/11315 "2018-07-18T19:30:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [July 18, 2018, 7:30pm UTC](https://community.hubspot.com/t/form-data-intercept/11315/1 "2018-07-18T19:30:28Z")

</div>

Hi all. I have a form embedded in an external site. I would like to store the information before it is submitted to Hubspot. I listen for the event (as described in the forms documentation) and send the event.data to my php file, but the form data never shows. event.data.type, event.data.eventName, event.data.id all show up fine, but for the life of me, I cannot get the form data. event.data.data is always an empty object. The data in the form shows up on hubspot, but I can’t seem to access it through JavaScript. Does anyone have a solution or suggestion?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [July 19, 2018, 1:58am UTC](https://community.hubspot.com/t/form-data-intercept/11315/2 "2018-07-19T01:58:36Z")

</div>

Got the job done by using the onFormSubmit(){} callback. Turned out the data was in $form[0] and not in $form as I expected.
