AI TOOLS

Embed a Google Form in a shared HTML page

A landing page, proposal or report with a Google Form on it. Which form address to use, why the form sits in a small box, what a wrong form ID shows, how to pre-fill an answer, and how to share the page as a link.

4 min read·

Ask Claude or ChatGPT for a landing page or a sign-up page "with a Google Form" and it adds an <iframe> pointing at docs.google.com/forms. That works in a shared page once the address and the height are right. No script is needed.

The tests below were run in headless Chrome against a public Google Form, on a page served over http and on the same file opened from disk.

Use the embed address

In Google Forms, click Send, then the <> tab, and copy the code. The address in it ends in /viewform?embedded=true. AI tools often use the plain /viewform share link instead.

Tested: both loaded the form inside the frame. The plain /viewform address also logged a console message that Google's report-only rule "frame-ancestors 'none'" was violated. Google is not blocking it today, but that rule says the plain share link is not meant to be framed. Add ?embedded=true and the message goes away.

Set a height

A Google Form frame does not grow to fit the form. Tested: an iframe with no height attribute showed the form in a 150-pixel box with a scroll bar. Google's own code sets width="640" and a height for the form you copied it from; if you add questions later, raise the height or the form scrolls inside the frame.

Use your form ID

The form ID is the long part after /forms/d/e/ in the share link. AI tools sometimes fill in a placeholder or a made-up ID.

Tested: an ID that does not exist loaded Google Drive's "Sorry, the file you have requested does not exist" page inside the frame. If you see that, copy the code again from the Send dialog. The /edit address you see while building the form is for editors, not for embedding.

Opening the file from your computer

Tested: the same page opened from disk (a file:/// address) loaded every frame the same way as over http, including the pre-filled answer below.

Pre-fill an answer

To tell which page a response came from, pre-fill a question. In Google Forms, open the three-dot menu, choose Get pre-filled link, type an answer and copy the link. It adds usp=pp_url&entry.NUMBER=VALUE to the address. Put those after embedded=true: .../viewform?embedded=true&usp=pp_url&entry.NUMBER=proposal.

Tested: the answer box in the embedded form showed the pre-filled value. Viewers can still change it before they submit.

Upload it and send the link

Drag the HTML file onto the FileShare Pro dashboard and copy the link. Viewers need no account on FileShare Pro. The shared view does not restrict frames inside your page, so the form loads there as it did in the test. Responses go to your Google Form and its linked Sheet, not to FileShare Pro.

Edit the questions in Google Forms and the embedded form shows the new version on the next load; the page and the link stay the same. To collect replies without a form service, see a feedback form with no backend. Related: a Tally form in a shared page, a Typeform in a shared page and a Google Sheet in a shared page.

Frequently asked

Do viewers need a Google account to answer?

Only if the form requires it. A form limited to one response per person, or to people in your organization, asks viewers to sign in to Google. Without those settings, anyone who opens the page can answer.

Does a password on the page keep the form private?

No. The password protects the page. The form address is in the page source and the form works on its own at its Google address: password-protecting an HTML page.

Does the page show up in Google?

No. Shared files carry a noindex header: keeping a preview out of Google.

Got a page to share?

Drop the file, copy the link — live in seconds, free plan included.

Start sharing free