collect form info via JS / API?

SOLVE
Engee
Member

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:

<div id="invulform">
 <form class=owr-invulform-form action=input>
 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"><input class="mdl-textfield__input owr-inputline" type=text onkeyup="validateInput(naam)" autocomplete="off" id=naam><label class=mdl-textfield__label for=naam>Naam</label><label class="errorlabel" id="foutNaam">Fout</label></div>
 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"><input class="mdl-textfield__input owr-inputline" type=text onkeyup="validateInput(email)" autocomplete="off" id=email><label class=mdl-textfield__label for=email>Email</label><label class="errorlabel" id="foutEmail">Email</label></div>
 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"><input class="mdl-textfield__input owr-inputline" type=text onkeyup="validateInput(tel)" autocomplete="off" id=tel><label class=mdl-textfield__label for=tel>Telefoon</label><label class="errorlabel" id="foutTel">Telefoon</label></div>
 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"><input class="mdl-textfield__input owr-inputline" type=text onkeyup="validateInput(bedrijf)" autocomplete="off" id=bedrijf><label class=mdl-textfield__label for=bedrijf>Bedrijf</label><label class="errorlabel" id="foutBedrijf">Bedrijf</label></div>
 </form>
 <button class="owr-bttn-smp mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" onclick="validateInputAndSend(all)">Start met plannen</button>
  
 <a href="registratieform-mobile.html"><button class="owr-button-mobile mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" onclick="validateInputAndSend(all)">Start met plannen</button></a>
  
 </div>
0 Upvotes
1 Accepted solution

Accepted Solutions
aliciaw
Solution
Top Contributor

Hey @Engee - You can find information on setting up a Forms API on the HubSpot Developers Forum  https://developers.hubspot.com/docs/methods/forms/forms_overview

View solution in original post

0 Upvotes
1 Reply 1
aliciaw
Solution
Top Contributor

Hey @Engee - You can find information on setting up a Forms API on the HubSpot Developers Forum  https://developers.hubspot.com/docs/methods/forms/forms_overview

View solution in original post

0 Upvotes