Adding a HubSpot Form to a Block

Vote:
 

Hi all, I'm trying to add a HubSpot form to a Image Content or RTE Block. I've added the HubSpot form code to the source code in the block but when I preview the form does not show, the RTE space is just left blank. Any idea why that is? Or how I can work around this?

#226374
Aug 11, 2020 21:34
Vote:
 

Hi,

Are you using it in iframe or you are using Hubspot addon (https://webhelp.episerver.com/16-7/addons/marketing-automation/hubspot.htm)?

#226401
Aug 12, 2020 6:48
Vote:
 

By default, script tags are not allowed in RTE properties. Therefore the form code is removed upon saving.

You can either customize it to allow script tags or you can use the HubSpot add-on to render a form.

#226402
Aug 12, 2020 7:17
Vote:
 

You can allow script tag the TinyMCE using below code inside initialization module -


   context.Services.Configure<TinyMceConfiguration>(config =>
            {
                config.Default()
                    
              .AddSetting("extended_valid_elements", "script[language|type|src]");
            });
#226413
Edited, Aug 12, 2020 8:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.