Vanilla Form Help

This page covers the basic workflow, builder settings, and checks before publishing. To open the builder, use/vanilla-form/app/.

1. What you need

  • A Google account to create and manage the Google Form
  • A web page where you can paste and publish the generated HTML
  • A share URL (`forms.gle` or `docs.google.com/forms/...`) or an `iframe` embed code for the Google Form

2. Basic workflow

  1. Create a Google Form and copy its URL or embed code.
  2. Load it into Vanilla Form Builder.
  3. Adjust labels, required fields, visibility, and input types.
  4. Choose a submission method (Standard by default) and configure the post-submit behavior, styles, and analytics.
  5. Check the preview, select “Export form”, and copy the HTML from the export dialog.
  6. For Standard, paste the HTML into your page. Advanced also requires the generated PHP file on the same site.
  7. Publish, run a submission test, and check the response in Google Forms.

3. Google Form setup

If you do not have a Google Form yet

You can start from thecontact-form template (Japanese). Make a copy in your own Google Drive, customize it, publish it, then load the respondent URL into Vanilla Form Builder.

Get the share URL

  1. Open the Google Form editor.
  2. Click “Publish” in the upper right.
  3. Set respondent access so anyone with the link can answer.
  4. Copy the respondent link.

Supported respondent access

Vanilla Form supports Google Forms that anyone with the link can answer. Settings that require Google sign-in are not supported.

  • Limit to one response
  • Collect verified email addresses
  • Restrict respondents to an organization, Google Group, or selected users
  • Include a file-upload question

If you need these settings or file uploads, use the original Google Form instead of Vanilla Form.

Get the embed code

  1. Open the publish dialog in Google Forms.
  2. Select the embed option.
  3. Copy the generated `iframe` code.

Link a response spreadsheet

Link a Google Spreadsheet if you want responses and notifications in one place, especially when several people handle inquiries.

4. Builder settings

Field customization

Adjust labels, placeholders, required fields, visibility, and input types for each field. Fields required by the original Google Form cannot be hidden or made optional.

Post-submit behavior

Choose an inline message, a dialog, or a thank-you page. For a thank-you page, use a full `https://...` URL or a root-relative path such as `/thanks/`.

Styles and generated code

Choose the default style, no styles, Bootstrap classes, or Tailwind classes. Bootstrap and Tailwind output require the matching CSS on the destination page.

Generated HTML is displayed and copied in a readable format, without altering form response values. The generated HTML is only assembled when you open “Export form”; close the dialog to return to editing.

Analytics and Standard anti-spam

Submission events can trigger GA4 or GTM events. In Standard (HTML), you can also enable an optional honeypot and minimum wait time. These are client-side checks, not a substitute for server-side verification.

5. Advanced (HTML + PHP) setup

Advanced validates submissions on your PHP server before forwarding them to Google Forms. It requires PHP hosting, but adds server-side validation, rate limiting, and optional CAPTCHA.

Standard vs. Advanced

FeatureStandard (HTML)Advanced (HTML + PHP)
Files to deployHTML onlyHTML + a standalone PHP file
Submission pathDirect to Google FormsThrough PHP on your site
HoneypotOptionalAlways on (browser and PHP)
Minimum wait timeOptionalNot used
Rate limitingNoneAlways on in PHP
CAPTCHANoneNone / Turnstile / reCAPTCHA v3

Exporting and deploying Advanced

  1. Under “Behavior & output” → “Security & privacy”, choose “Advanced (HTML + PHP)”.
  2. “Additional bot protection” defaults to “None”. Choose Cloudflare Turnstile or Google reCAPTCHA v3 only if needed, then enter the keys.
  3. Use the preview to check appearance and inputs. When demo keys are configured, you can also test Turnstile or reCAPTCHA v3 verification. This uses happas.jp demo keys, not your own keys or deployed PHP. No responses are sent to Google Forms.
  4. Open “Export form”, copy the HTML into your page, and download `vanilla-form.php`.
  5. Deploy PHP on the same origin (scheme, hostname, and port) as the page with your HTML. The generated form uses the relative action `vanilla-form.php`, resolved from the page URL. When embedding HTML into WordPress or another existing page, check that the PHP file is reachable at that relative URL.
  6. Your server needs PHP 8.1+, the cURL extension, outbound HTTPS access, and a writable system temporary directory. Submit a test on the deployed site and check the actual response in Google Forms.

Generated PHP includes your CAPTCHA secret key. Do not commit it to a public Git repository, publish it as a download, or place the secret in HTML or JavaScript. Make sure your hosting provider executes PHP rather than serving PHP source files.

Cloudflare Turnstile

  1. Open the Cloudflare Turnstile dashboard and add a widget.
  2. Give it a name, register the hostname where the form will be published (for example, `example.com`), and choose a widget mode.
  3. Copy the sitekey and secret key into the corresponding Builder fields.
  4. Test successful and rejected submissions on the actual hosting domain.

See the official Turnstile dashboard guide. You do not need to use Cloudflare DNS for your website to use Turnstile.

Google reCAPTCHA v3

  1. Register your site in the reCAPTCHA Admin Console. Select reCAPTCHA v3; v2 keys are not supported.
  2. Register the domain where you will publish the form, and obtain the site key and secret key.
  3. Enter both keys in the Builder. Start with the default score threshold of `0.5` and adjust it based on your traffic and false positives.
  4. Test the published form. v3 obtains a fresh token on submission. The Builder preview uses demo keys and cannot verify your deployed keys or PHP.

See the official reCAPTCHA v3 guide. Check the privacy notice and external-script policies for your site before enabling either CAPTCHA service.

Limits of protection

Advanced enforces its honeypot, rate limit, and field validation in PHP even if someone bypasses JavaScript. However, it cannot prevent submissions directly to the public Google Forms URL. A successful PHP response does not prove that Google saved the answer.

6. Checks before publishing

  • Standard preview sends real data to Google Forms. Advanced preview does not submit responses.
  • Configure response notification emails in Google Forms.
  • When several people manage the form, check access to both the form and its response spreadsheet.
  • Keep the generated `begin/end generated by vanilla-form-builder` comments if you want to review code changes later.

7. How data is handled

  • When loading a form, the service reads field information from its URL or embed code.
  • The service does not store entered URLs or builder settings.
  • Standard sends directly to Google Forms (`formResponse`). Advanced routes through your PHP server before forwarding to Google Forms.

8. Troubleshooting

Loading fails

Use a public `forms.gle` link, a `docs.google.com/forms/.../viewform` URL, or an embed `iframe` code. Vanilla Form cannot load forms that require sign-in, are limited to an organization, or contain file-upload questions.

The thank-you page setting is rejected

Enter a full `https://...` URL or a root-relative path such as `/thanks/`.

Submission events are not tracked

Check that GA4 or GTM is loaded on the destination page and that the event name is correct.

Advanced submission fails

Confirm that the PHP file is in the correct location and that PHP 8.1+, cURL, outbound HTTPS, and a writable system temporary directory are available. For CAPTCHA, check the registered hostname and both keys. If rate limiting was triggered, retry later.

The form looks broken

Check that the selected output style matches the CSS loaded on the page where you pasted the form.

9. Related pages