Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
FORMS - Modifying Input Value on onFormSubmit
Member
Aug 14, 2020 6:58 AM
I am able to pull information from the Global Form Event listener.
window.addEventListener("message", function(event) {
if (event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmit') {
console.log(event.data.data);
}
});
I require modifying the data values which isn't effected by direct edits to the event.data.data values and the form isn't obtainable through $('#formid') due to the hubspot form being enclosed within an iFrame.
The API documentation doesn't seem clear on this and previous threads push the $(input=name).val().change() which has the same issue as obtaining the form directly as above.
Has anyone solved this through a documented API or is it neccessary to muddle together a hacked solution?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content