onFormSubmit callback broken in IE


#1

Hi guys,

Looks like the onFormSubmit callback is broken in IE. Here is my code below just a simple embed form. I want to dispatch a custom event on form submit using the onFormSubmit callback but I get an warning in IE that prevents the callback to be executed:

“HTML1527: DOCTYPE expected. Consider adding a valid HTML5 doctype: “”.”

Any ideas on what is wrong there? is that a bug?

Thanks!

<div style="display:block; " id="hubspotHack">
  <script>
    hbspt.forms.create({
      portalId: '320463',
      formId: 'ed2b29b9-cd82-4e7a-9925-d021ae837e10',
      onFormReady:function($form){
        console.log('form ready');
      },
      onFormSubmit: function($form) {
        console.log('form submited: %o', $form);
      }
    });
  </script>
</div>