Embed guide

Add a form to Ghost

Add a hootform form to a Ghost site with an HTML card in a post or page, or site-wide with code injection for popups and sliders.

What works on Ghost

Way to show a formOn Ghost
In the page ✓
Popup ✓
Slider ✓
Full page ✓

Where the snippet goes

Ghost takes custom HTML through the HTML card in its editor.

  1. In a post or page, type /html on a new line, or open the card menu and choose HTML.
  2. Paste the snippet from your form's Share menu, on the Embed tab.
  3. Preview the post, then publish or update it.

For a popup or slider on every page, add the script line once in the site's Code injection settings, in the site footer, and put the button in an HTML card wherever you want it.

Useful on a publication

  • A reader survey at the end of a newsletter post, in the page.
  • A feedback form in a slider on every page, opened from a small button.
  • Add data-hootform-hidden="source=newsletter" to know which post a response came from.

The snippets

Replace FORM_ID with your form's id, or copy the finished version from the form's Share menu, on the Embed tab.

In the page

<div data-hootform="FORM_ID"></div>
<script src="https://hootform.com/embed.js" async></script>

Popup

<button type="button" data-hootform="FORM_ID" data-hootform-mode="popup">Open form</button>
<script src="https://hootform.com/embed.js" async></script>

Slider

<button type="button" data-hootform="FORM_ID" data-hootform-mode="slider">Open form</button>
<script src="https://hootform.com/embed.js" async></script>

Full page

<div data-hootform="FORM_ID" data-hootform-mode="fullpage"></div>
<script src="https://hootform.com/embed.js" async></script>

Questions people ask

Does the form appear in the Ghost newsletter email?

No. Email clients don't run scripts or frames. Link to the form from the email instead, and embed it on the post's page on your site.

Can I show a form on every post?

Yes. Put the snippet in your theme's post template, or add the script with code injection and a button in each post.

Where do responses go?

Into hootform, where you can read, export and get notified about them.

Other platforms

Your next form, finished.

Unlimited forms and responses on the free plan. No credit card.