Embed a form on Hostinger

TL;DR: To embed a Sender form on Hostinger, publish the form in Sender and copy its JavaScript snippet and HTML snippet. Paste both into one Embed code element on your Hostinger page, JavaScript first. Then publish the page and send a test signup.

Where to find it: Forms → your form → Publishing settings

Before you start

You need two things:

  • An embedded form in Sender. Popups don’t need this guide. They only need the JavaScript snippet in your site’s head. See creating signup forms.
  • A published form. A form with the DRAFT badge won’t load on your site. Open Publishing settings and click Publish first.
A published embedded form in Sender

Step 1: Copy the embed code in Sender

  1. Go to Forms and click the settings icon next to your form.
Forms list in Sender with status badges, stats and action buttons
  1. In Publishing settings, scroll to the integration instructions. An embedded form gives you two snippets: – The JavaScript snippet loads Sender’s form script. It’s the same for every form in your account. – The HTML snippet is a short div that marks where this form appears on the page.
  2. Copy both.
JavaScript and HTML embed snippets in Sender form settings

Step 2: Add the code to Hostinger

  1. Open your site in Hostinger Website Builder and go to the page for the form.
  2. Add an Embed code element. Click Add element, then drag Embed code to where you want the form.
  3. Paste both snippets in the same box. Put the JavaScript first and the HTML below it. Don’t split them across two elements.
  4. Save, then resize the element so the whole form fits.
  5. Publish the site.

This video shows the whole process:

Step 3: Check the form works

  1. Open the live page, not the editor. Embedded forms may not fully show inside the Hostinger editor, so use preview or the published site.
  2. Send a test signup with your own email address.
  3. Check it arrived. In Sender, open the form’s Overview. Views and signups should go up, and your address should appear in the group the form adds subscribers to.

Fix embedded form problems

  • An empty space shows where the form should be. One of the snippets is missing. Paste both into the same Embed code element, JavaScript first.
  • Nothing shows at all. Check the form is published in Sender and the Hostinger page is published too.
  • The form is cut off. Make the Embed code element taller or wider so the whole form fits.
  • Test signups don’t arrive. If double opt-in is on, confirm the email first. See double opt-in for forms.

For more checks, see form troubleshooting.

What to set up next

Using another builder? See embed a form on a website builder. Then track signups in form analytics.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *