Skip to content

Instantly share code, notes, and snippets.

@andrei-tofan
Last active May 5, 2017 11:48
Show Gist options
  • Save andrei-tofan/b1d429e4912fd3c874d0d0eaec676af4 to your computer and use it in GitHub Desktop.
Save andrei-tofan/b1d429e4912fd3c874d0d0eaec676af4 to your computer and use it in GitHub Desktop.
LeadBI Native Form Integration
// 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