# collect form info via JS / API?

**URL:** <https://community.hubspot.com/t/collect-form-info-via-js-api/2197>\
**Category:** Lead Capture Tools\
**Created:** [May 30, 2017, 9:31pm UTC](https://community.hubspot.com/t/collect-form-info-via-js-api/2197 "2017-05-30T21:31:08Z")\
**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:** [May 30, 2017, 9:31pm UTC](https://community.hubspot.com/t/collect-form-info-via-js-api/2197/1 "2017-05-30T21:31:08Z")

</div>

All,

I’m using a form on my website, but before submitting i first check via JS of the needed fields are filled in.

When all data is filled in, the form is send (to us via email), but the form is not collected in hubspot 😞

Is there any way to trigger the collection of a form via JS or the API?

FYI, here the html code of my form:

| 

 |
| | |
| | 
NaamFout
 |
| | 
EmailEmail
 |
| | 
TelefoonTelefoon
 |
| | 
BedrijfBedrijf
 |
| | |
| | Start met plannen |
| | |
| | registratieform-mobile.html"\>Start met plannen |
| | |
| | |

---

<div class="post-metadata">

**Author:** ![aliciaw](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aliciaw/32/92090_2.png) [@aliciaw](https://community.hubspot.com/u/aliciaw)\
**Post date:** [June 5, 2017, 6:08pm UTC](https://community.hubspot.com/t/collect-form-info-via-js-api/2197/2 "2017-06-05T18:08:17Z")

</div>

Hey [@Engee](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9953) - You can find information on setting up a Forms API on the HubSpot Developers Forum [https://developers.hubspot.com/docs/methods/forms/forms\_overview](https://developers.hubspot.com/docs/methods/forms/forms_overview)
