Last active
May 5, 2017 11:48
-
-
Save andrei-tofan/b1d429e4912fd3c874d0d0eaec676af4 to your computer and use it in GitHub Desktop.
LeadBI Native Form Integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// leadbi.com | |
var native_formid = '3638a022-2823-4541-b31c-1856f6a72933'; | |
// get form instance | |
window.$leadbi_forms.getForm(native_formid, function (err, form) { | |
// form data | |
var data = { | |
first_name: 'test', // optional | |
last_name: 'test', // optional | |
email: '[email protected]', // required | |
company: 'test', // optional | |
role: 'test', // optional | |
phone: '+1....', // optional | |
website: 'test.com', // optional | |
}; | |
// submit form | |
return form.submit(data, function (err, result) { | |
console.log('form data sent'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment