Skip to content

Wrapper for the hubspot forms. This allows you to set a dynamic redirect URL after submit the form

License

Notifications You must be signed in to change notification settings

Increnta/increntaHSForms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

increntaHSForms

Wrapper for the hubspot forms. This allows you to set a dynamic redirect URL after submit the form

Usage:

Add hubspot and increntaForm js files:

<script charset="utf-8" type="text/javascript" src="http://js.hsforms.net/forms/v2.js"></script>
<script charset="utf-8" type="text/javascript" src="../src/increntaForm.js"></script>

create a new increntaForm instance

$(document).ready(function(){
  new increntaForm({
    portalId: '2296942',
    formId: '4c60baee-19fa-4f1e-8063-af8e0da5a59b',
    target: '#forWrapperSelector',
    getRedirect: function(form){
      return 'http://josep.com';
    }
  });
});

increntaForm Options:

portalId: (string)[Required] Hubspot portalID
formId = (string)[Required] Hubspot formID
target =(string)[Recommended] CSS Selector
formReady = (function) Function to execute when hubspot form get ready
onSend = (function) Function to execute before send the data to Hubspot
getRedirect = (function) Return url to redirect

About

Wrapper for the hubspot forms. This allows you to set a dynamic redirect URL after submit the form

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages