Same issue here.
This is my code which now doesn’t work anymore:
const $ = window.jQuery,
portalId = window.App ? window.App.hubspot_portal_id : false;
export default function () {
if (!portalId) {
return;
}
$('.hubspot-form').each(function (index) {
const $this = $(this),
id = 'hubspot-form-' + index;
$(this).attr('id', id);
hbspt.forms.create({
css: '',
target: '#' + id,
formId: $this.data('formId'),
portalId: portalId,
cssClass: 'hubspot-form',
});
});
}