The problem is that when the page is uploaded I see another form at the bottom of the page in addition to the form that is part of the template. Ho w can I disable this duplication?
window.addEventListener('message', event => {
if(event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormReady') {
// add the code from the onFormReady callback from your embed code and remove the embed code
}
});
window.addEventListener('message', event => {
if(event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormReady') {
// add the code from the onFormReady callback from your embed code and remove the embed code
}
});
regarding your comment, I need to have the form editable from the module, is there a way to add some javascript code to the form with using sonthing other than bspt.forms.create?