HOAcrew

Add the form to Shopify

A Custom Liquid section in the theme customizer. You never open the code editor and you never edit a theme file.

Where the code goes
a Custom Liquid section
How the form arrives
Inside your page
the visitor never leaves your site
What you paste
Two lines of HTML
Addresses per key
10
list every spelling your site answers on

Add a Custom Liquid section

You need your key first.

It is on the plugin page in your console, under Settings, Website plugin. That page is also where you list the web addresses your form is allowed to appear on, and it will not work anywhere you have not listed. The overview walks through getting one.

This is the code. Replace hoac_embed_your_key_here with the key from your console. That is the only edit it needs.

The snippet

<div data-hoacrew-proposal-form data-key="hoac_embed_your_key_here"><a href="https://hoacrew.com/embed/w/hoac_embed_your_key_here">Request a proposal</a></div>
<script src="https://hoacrew.com/embed/v1.js" async></script>

Two lines: the place the form goes, and the script that puts it there. The link inside the first line is a plain one to your hosted form, and it is what a visitor gets if the script never arrives — a browser with scripting off, a corporate proxy, a blocker. The loader clears it the moment it runs, so nobody sees both. That wording is yours: change Request a proposal to whatever you would rather it said and nothing else is affected.

  1. 1

    Open the theme customizer

    In your Shopify admin, go to Online Store → Themes and press Customize on your live theme.

  2. 2

    Switch to the page you want

    Use the page selector along the top to move off the home page and onto the page the form belongs on — a Contact or Services page, usually under Pages.

  3. 3

    Add the section

    In the left panel press Add section and choose Custom Liquid. It appears at the bottom of the page; drag it up the list to where you want it.

  4. 4

    Paste and save

    Paste the snippet into the Liquid code box on the right and press Save. The customizer preview may or may not render it; the live page is the one that counts.

Register both spellings of your address.

To a browser, acme-lawns.com and www.acme-lawns.com are two different places. If your site answers on both, list both on the plugin page. The same goes for http:// against https://. This is the reason behind almost every form that never appears.

Which address to register

Every Shopify store has two addresses: the domain you sell under, and a built-in one ending in .myshopify.com. Shopify’s own preview links use the built-in one, so a form that works perfectly on your real domain shows nothing in a preview unless you have listed both.

List your selling domain, with and without www. if both work. Add the .myshopify.com address while you are setting things up if you want previews to work, and remove it afterwards if you would rather keep the list short.

A store still behind its password page

If your store has not launched yet, the password page stands in front of every page, including the one with the form on it. Nothing is wrong with the install; nobody without the password can reach the page at all. Test after you remove the password, or test on the hosted form instead.

How to tell it worked

  1. Open the live page on your selling domain, in a normal browser tab.
  2. The form is there with your company’s name on it. Send a test, taking more than a few seconds over it: a submission completed unusually fast is filed as suspected spam.
  3. Open Settings → Website plugin in your HOAcrew console. Your test is in the list.

If your store has a security policy

Most websites have no Content-Security-Policy and this section does not apply to them. If yours has one — a security plugin added it, your host sets it, or whoever built the site wrote one — it needs to allow two things from us:

The two allowances

script-src  https://hoacrew.com
frame-src   https://hoacrew.com

The first lets the loader script run. The second lets the form’s frame render. Allow the first and forget the second and you get a blank space where the form should be, with a line in the browser’s developer console naming frame-src. Nothing else is needed: the form loads no fonts, no analytics and no other company’s code, so there is no third allowance hiding behind these two.

On Shopify a policy usually arrives with an app rather than from the theme — security and headers apps are the common source. If the form is missing and the browser’s developer console names a policy, the app that added it is where the two allowances go. Turning that app off for a moment is the quickest way to confirm it is the one responsible.

The same form, somewhere else