Form Data Intercept

contacts
forms

#1

Hi all. I have a form embedded in an external site. I would like to store the information before it is submitted to Hubspot. I listen for the event (as described in the forms documentation) and send the event.data to my php file, but the form data never shows. event.data.type, event.data.eventName, event.data.id all show up fine, but for the life of me, I cannot get the form data. event.data.data is always an empty object. The data in the form shows up on hubspot, but I can't seem to access it through JavaScript. Does anyone have a solution or suggestion?


#2

Got the job done by using the onFormSubmit(){} callback. Turned out the data was in $form[0] and not in $form as I expected.