Put a form on your website

You can show a form inside a page of your own website, so people fill it in without leaving your site. Formhub gives you a small piece of code to paste into the page.

Steps

  1. Open the form's Publishing details (the tab at the top of the form's pages, or Publishing details on the form's ⋯ menu).
  2. Choose one of the two codes:
    • JavaScript embed: the best choice for most websites. The form resizes itself to fit, so there's no scroll bar inside it.
    • iframe embed: for website builders that only accept an iframe.
  3. Press Copy next to the code you chose.
  4. Paste it into your website where the form should appear. Most website builders have a block for pasting code, often called an HTML or embed block. If someone else looks after your website, send them the code.
  5. Publish the page on your website and check the form shows up.

Good to know

  • The iframe code starts with a height of 1200 pixels. If the form is longer or shorter, change the height number in the code to suit. The JavaScript embed doesn't need this.
  • The code keeps working when you edit or rename the form. Press Save in the builder and your website shows the new version.
  • If you turn the form off, your website shows "This form is not accepting responses at the moment." in its place.
  • The embedded form has no page background of its own, so it sits neatly on your page. A small "Hosted by Formhub" line stays at the bottom.
  • Responses from an embedded form go to the same place as responses from the link. See Where responses go.

Questions

Can I use the link and the embed at the same time? Yes. They are the same form, so all responses arrive together.

I only want to send the form to people, not put it on a website. Use the form link instead. See Share a form by link.

Still stuck? Inside Formhub, press Ask Yasmene at the bottom right, or send us a message.