I have the Zendesk iframe widget on my WordPress site. I need to somehow capture the user input in the parent window. I know we cannot use querySelector() for this because the form is in an iframe. But, is there a method in the zE library that can deliver this functionality?
Ultimately, I would like to console.log the name and email user input on submit. So, I will also need an event listener on the submit button. Ideally I would be able to do something like the following:
zE('webWidget:on', ‘submit’, function() {
console.log(zE.contact_form.input0.value);
});
Is there an alternative solution to capturing the form data in the parent frame?
Thanks in advance!
