REUSABLE FORM WRAPPER · SETUP

One link. Every form.

Change sourceUrl in config.json to your Short.io link, then upload the ZIP to Cloudflare Pages. Add the same helper once to your form HTML for automatic sizing above the keyboard.

Change only the source link

For another form, replace only sourceUrl in config.json. A direct Google Apps Script /exec URL gives the fastest startup. A Short.io source must redirect to that Google URL.

If a short link gives a resolution error, use the web app URL from Apps Script → Deploy → Manage deployments as sourceUrl. Your public short link can still point to Cloudflare.

Checking the configured source…

The existing form keeps its own design, fields and Google backend. Its title is picked up automatically after the helper connects.

1. Add the helper to Form.html

Copy the block below and paste it immediately before </body> in your existing Form.html. If Form.html lives in the FormEngine library, edit it there.

Keep the rest of Form.html. No changes to Code.gs, Config, Settings, AddQuestion.html or the four sheet wrappers are needed.

Download helper

Loading helper…

This helper works with your other Cloudflare form wrappers too. It sends layout dimensions, focus state and the public form title. Optional: list exact host origins in HOST_ORIGINS if you want to restrict it.

2. Publish the Apps Script change

  1. Save Form.html. If you use the FormEngine library, create a new library version and select that version in the active Sheet script.
  2. In the Sheet script, choose Deploy → Manage deployments → Edit → New version → Deploy. Update the existing deployment so its direct Google URL stays the same.
  3. Open the Cloudflare form with ?__fe_debug=1. The panel should show a measured top space. The value should return to 0 if Google's banner is absent.

3. Use a public short link without a loop

Keep the source short link pointing to Google. Share the Cloudflare URL, or use a second Short.io link for the public Cloudflare address.

If you want to retarget the same short link to Cloudflare, first download the resolved configuration below, replace config.json with it and upload the package again. That freezes the direct Google URL as the source. Then retarget your short link.

A direct Google source skips Short.io resolution entirely. This setup page refreshes the source before downloading; normal visits reuse a resolved destination for up to five minutes.

Check automatic fit · Open form

Sheet wrapper code

Your four existing wrappers can stay as they are. FormEngine already allows embedding. A reference copy is included for your other Sheets.

Download HostStub.gs