How to Embed Forms in Smart Rich Text Modules in HubSpot

How to Embed Forms in Smart Rich Text Modules in HubSpot

Trying to add a form exactly where it makes sense—mid-paragraph, inside a promo blurb, between related content blocks—can feel impossible in HubSpot’s default tools. Standard form modules are rigid. They often break layouts or push key CTAs to the bottom of the page, where conversion drops.

If you’ve ever struggled to place a demo request, gated content form, or newsletter signup seamlessly into your content flow, you’re not alone. Embedding forms inside Smart Rich Text modules gives you powerful control over when and how forms appear, without sacrificing styling or personalization.

This walkthrough shows you exactly how to embed forms using the Smart Rich Text module in HubSpot. You’ll learn what it is, how it works, where to access it, how to design around it, and how to measure performance once it’s live—so your team can deliver better conversion experiences with less hassle.

 

Embed Dynamic Forms into Smart Rich Text Modules

The Smart Rich Text module is one of HubSpot’s more flexible building blocks. Think of it as a content field that can change dynamically based on smart rules you define—like audience type, device, or contact data. It’s available across website pages, landing pages, emails, and custom templates, and it supports HTML editing.

That flexibility means you’re not locked into the classic form module’s layout. Instead, by embedding a form directly into this smart module, you maintain full control over both the design and the visitor experience. The form becomes part of your content instead of floating above or below it. Even better, the content (including the form) can now change intelligently depending on who’s viewing the page.

This functionality works across both HubSpot’s CMS and marketing tools. Form submissions, contact profiles, and analytics feed into your CRM just like they would with a traditional form. And if you’re using HubSpot’s AI-powered text suggestions or content personalization tools, those will still work inside this module too.

 

How It Works Under the Hood

Embedding a form within a Smart Rich Text module works by inserting HubSpot’s form embed code—or a HubL tag—into the HTML section of the content editor. When a visitor loads the page, HubSpot renders the form client-side using its Forms API.

Here’s what you need to know:

Input: You’ll need either the HubSpot form ID or a portal reference to that specific form.

Output: Once the form is submitted, data is captured just like any other HubSpot form—linked to the relevant contact record and tracked in analytics.

Because Rich Text modules interpret HTML and scripts, the embedded form appears just as expected on the frontend. You can use smart rules to conditionally show different versions of the module based on:

  • Contact list membership: Show a demo request for leads, but an upgrade form for current customers
  • Device type: Offer streamlined layouts for mobile-only views
  • Lifecycle stage: Gate content only for visitors marked as strangers or MQLs

You can also tailor styling using inline alignment, margin settings, or custom CSS wrappers. Personalization tokens work inside these modules as well, so you can greet users by name or reference their company details above the form.

The advantage: you get all the tracking and submission consistency of a normal form, but with greater creative and personalization control.

 

Main Uses Inside HubSpot

Personalized lead capture in page copy

If forms feel visually disconnected from your content, you’re likely missing conversion opportunities. Instead of pushing key forms to the footer or sidebar, embed them directly into the text.

Say you’re writing about service tiers or pricing models. Mid-paragraph, you add a “Get a quote” form right where it’s most relevant. Using Smart Rich Text logic, leads who’ve previously engaged with pricing info can see this in-line form, while colder traffic gets a softer CTA like “Download brochure.” No extra pages needed. Just smart variations in one place that meet each visitor where they are in the funnel.

Region‑specific or language‑specific forms

Managing multi-language or region-specific form delivery used to mean cloning pages or juggling multiple modules. With Smart Rich Text, you localize on the fly.

Example: Visitors from Germany see a form with German labels and an explicit GDPR consent checkbox. U.S.-based contacts see a different version without the extra compliance steps. Since both versions live in a single module variation, your workload stays lean, and localization runs much more smoothly.

Progressive profiling for repeat visitors

Forms that ask for the same information repeatedly can frustrate repeat users. Smart Rich Text modules let you swap form versions based on what your CRM already knows.

The first time someone visits, you may show a seven-field download form. On the second visit? Just email and the company name. You’re not guessing. The Smart Rich Text logic checks lifecycle stage, known contact properties, or list membership, and serves up the right form. You increase quality and decrease friction—without manually updating multiple page templates.

 

Common Setup Errors and Wrong Assumptions

Even with a flexible tool, it’s easy to make avoidable mistakes if you’re unfamiliar with the quirks of Rich Text modules. Here’s what to look out for:

Point: Pasting the embed code into the wrong content mode
HubSpot’s visual editor strips out JavaScript. If you paste the form code into normal edit mode, it won’t work. Always switch to source or HTML view before adding your embed snippet.

Point: Expecting smart rules to automatically swap forms
Smart rules affect module variations—not the HTML content. You’ll need one version of the module per audience segment, with a different embed code for each.

Point: Overlooking mobile layout or container styling
Rich Text modules inherit style from their parent containers. Without defined widths or class controls, a form can look broken or misaligned. Always preview on both desktop and mobile after embedding.

Point: Missing consent fields or GDPR requirements
If you’re embedding custom code, it’s easy to omit legally required elements. Stick to HubSpot’s official embed code whenever possible to ensure built-in consent fields stay intact.

 

Step-by-Step Setup or Use Guide

Before you begin, confirm that you have:

  • A published HubSpot form
  • Access to edit the page or template where the form will appear

Then follow these steps:

  • Open the HubSpot page
    Go to your content dashboard and select the page you’d like to edit. Use the drag-and-drop editor.
  • Add a Smart Rich Text module
    If your page template doesn’t already include one, drag this module from the “Common Modules” section into your layout.
  • Open source view
    Click into the module to edit. Then click the “</>” icon to switch to HTML/source code mode.
  • Get your embed code
    Navigate to Marketing > Lead Capture > Forms, select your form, click “Embed,” and copy the full code.
  • Paste the code
    In the module’s HTML box, paste the form code. Avoid adding extra tags or wrapping elements that could interfere with rendering.
  • Add supporting copy or tokens
    Write a sentence before or after the form. You can include personalization like “Hi {{contact.firstname}}, request your quote below.”
  • Set smart rules
    Click “Make smart” on the module toolbar. Choose audience variations like “List Membership” or “Device Type.” Then, for each variation, paste the version-specific embed code into the HTML view.
  • Preview and test
    Publish the page or use preview mode. Submit test entries under different conditions (new vs. returning, mobile vs. desktop) to ensure data hits the CRM as expected.

 

Measuring Results in HubSpot

Once the form is live, track its performance right from HubSpot’s analytics tools.

Go to Reports > Analytics Tools > Forms. From there, review:

  • Form views: Make sure each smart variation is receiving impressions
  • Submission rate: Compare submission-to-view ratios between variations to uncover which format or segment works best
  • Submission source: See which channels (email, search, social) are driving the most interaction

For more accurate attribution, give each variation its own internal name when creating the form. That way, even though the forms live in the same module, the reporting stays distinct.

Want to go deeper?

  • Build a custom report filtered by Form ID and Page Title
  • Add conversion rates by lifecycle stage or device
  • Embed this report in a dashboard that RevOps and marketing can access weekly

Use these insights to iterate—shorten underperforming forms, adjust targeting, or tweak content placement.

 

Short Example That Ties It Together

Let’s say your company offers demos for a SaaS product. Your team builds a landing page with three Smart Rich Text modules: the intro, product description, and demo CTA.

Here’s the process in action:

  1. You create a form called “Demo Request – Standard”
  2. You copy the embed code
  3. You paste it into the second Rich Text module using HTML view
  4. You define smart logic:
  • Existing customers see a simple upgrade request form
  • Leads see the full demo request form
  • Mobile visitors get a compact version with mobile-friendly inputs

When visitors submit, the forms all feed data cleanly into your CRM. Reporting shows which audience segment is converting better, and your RevOps team can fine-tune the pipeline based on lifecycle insights.

This kind of setup gives your team creative control and tactical insight, without requiring extra development work or page duplication.

 

How INSIDEA Helps

INSIDEA partners with marketing and RevOps teams to help you get more from HubSpot’s full suite—whether you’re embedding forms, building workflows, structuring smart content, or aligning CRM data.

Here’s how we support your goals:

  • HubSpot onboarding: Get your portal and content frameworks set up right from the start
  • Ongoing HubSpot management: Keep data clean, automations stable, and output consistent
  • Smart automation support: Align internal processes with high-impact workflows
  • Custom dashboards and reporting: Visualize performance and guide daily decisions

If you’re troubleshooting embedded form logic, testing smart content variations, or optimizing page conversions, our team has real-world experience to share. Visit INSIDEA to schedule a strategy call with a certified HubSpot pro. Also, check out INSIDEA’s HubSpot consulting services

Jigar Thakker is a HubSpot Certified Expert and CBO at INSIDEA. With over 7 years of expertise in digital marketing and automation, Jigar specializes in optimizing RevOps strategies, helping businesses unlock their full potential. A HubSpot Community Champion, he is proficient in all HubSpot solutions, including Sales, Marketing, Service, CMS, and Operations Hubs. Jigar is dedicated to transforming your RevOps into a revenue-generating powerhouse, leveraging HubSpot’s unique capabilities to boost sales and marketing conversions.

The Award-Winning Team Is Ready.

Are You?

“At INSIDEA, it’s all about putting people first. Our top priority? You. Whether you’re part of our incredible team, a valued customer, or a trusted partner, your satisfaction always comes before anything else. We’re not just focused on meeting expectations; we’re here to exceed them and that’s what we take pride in!”

Pratik Thakker

Founder & CEO

Company-of-the-year

Featured In

Ready to take your marketing to the next level?

Book a demo and discovery call to get a look at:


By clicking next, you agree to receive communications from INSIDEA in accordance with our Privacy Policy.