Hi there,
I am not a developer but I am quite curious about how I can add a custom field in Hubspot design tool. I tried to add that “HTML” field but I couldn’t. Would really appreciate if someone could share with me how I can add custom new field (HTML).
PS. this was done by an unknown developer which I have lost connection with.
Thanks,
AK2X
Hi @AK2X,
the html field is an unavailable field which comes - most likely - from a default module. This means that you can’t ‘just add’ it to a module like other field types.
If you want a HTML-like function you could use the rich-text. Not really recommended, but possible.
If you like to display the input of the rich-text(I called this rich-text “HTML”) as code you can write the HTML+Hubl part like this
<code>
<pre>
{{ module.html }}
</pre>
</code>
You can also modify the rich-text via CLI(can be a bit hard to start if you’re not a developer) to limit it to just the source-code view so you’ll get basically an HTML like experience.
If you go the CLI way the module fields.json file for the HTML-like rich-text would look like this
{
"name" : "html",
"label" : "HTML",
"required" : false,
"locked" : false,
"type" : "richtext",
"default" : null,
"enabled_features" : ["source_code"]
}
hope this helps
best,
Anton
Hi @AK2X
To add a custom HTML field in HubSpot’s design tool, you can follow these steps:
Log in to your HubSpot account and navigate to the Design Tools.
Click on the template you want to edit.
In the left-hand sidebar, click on “Edit template” to open the template editor.
Select the module or element where you want to add the custom HTML field.
Click on the “Settings” icon (gear icon) for that module/element.
In the settings panel, scroll down to the “Custom fields” section.
Click on the “+ Add custom field” button.
Select “Custom HTML” as the field type.
Enter a name for the custom field and click on the “Create” button.
In the custom field editor, you can add your HTML code in the provided text area.
Save the changes by clicking the “Save” button.
Once you have added the custom HTML field, you can use it in your template by inserting a dynamic content module and selecting the custom field as the content source.
Note: Adding custom HTML fields requires certain permissions, so make sure you have the necessary access before attempting to add a custom HTML field. Additionally, be careful when adding custom HTML code, as it can potentially break the layout or functionality of your template if not implemented correctly.
Please mark it as SOLUTION ACCEPTED if you like the solution.
Thank you!
