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
- Create a Google Form and copy its URL or embed code.
- Load it into Vanilla Form Builder.
- Adjust labels, required fields, visibility, and input types.
- Choose a submission method (Standard by default) and configure the post-submit behavior, styles, and analytics.
- Check the preview, select “Export form”, and copy the HTML from the export dialog.
- For Standard, paste the HTML into your page. Advanced also requires the generated PHP file on the same site.
- 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
- Open the Google Form editor.
- Click “Publish” in the upper right.
- Set respondent access so anyone with the link can answer.
- 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
- Open the publish dialog in Google Forms.
- Select the embed option.
- 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
| Feature | Standard (HTML) | Advanced (HTML + PHP) |
|---|---|---|
| Files to deploy | HTML only | HTML + a standalone PHP file |
| Submission path | Direct to Google Forms | Through PHP on your site |
| Honeypot | Optional | Always on (browser and PHP) |
| Minimum wait time | Optional | Not used |
| Rate limiting | None | Always on in PHP |
| CAPTCHA | None | None / Turnstile / reCAPTCHA v3 |
Exporting and deploying Advanced
- Under “Behavior & output” → “Security & privacy”, choose “Advanced (HTML + PHP)”.
- “Additional bot protection” defaults to “None”. Choose Cloudflare Turnstile or Google reCAPTCHA v3 only if needed, then enter the keys.
- 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.
- Open “Export form”, copy the HTML into your page, and download `vanilla-form.php`.
- 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.
- 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
- Open the Cloudflare Turnstile dashboard and add a widget.
- Give it a name, register the hostname where the form will be published (for example, `example.com`), and choose a widget mode.
- Copy the sitekey and secret key into the corresponding Builder fields.
- 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
- Register your site in the reCAPTCHA Admin Console. Select reCAPTCHA v3; v2 keys are not supported.
- Register the domain where you will publish the form, and obtain the site key and secret key.
- 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.
- 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.