How to Use Pre-filled Fields in Google Forms
Pre-filling fields allows you to automatically populate form fields with data when a user opens your form. This is useful for personalizing the experience or passing known information — like a user's name, email, or a campaign source — so respondents don't have to type it themselves.
Pre-filled fields work with both the Embed in a web page and Share the link options.
How to configure pre-filled fields
The pre-fill editor is available in the Share tab under both modes — Embed in a web page and Share the link. The steps below are the same regardless of which mode you choose.
Open the Share tab
In the CustomGForm dashboard, open the Share tab for your form. You can use either mode:
- Embed in a web page — the pre-fill values are written into the embed code.
- Share the link — the pre-fill values are appended to the URL as query parameters.
Customize fields (optional)
Under Step 1 — Customize fields, you'll find the Pre-fill fields with values section:
- Click Add new row.
- Select the field you want to pre-fill from the dropdown.
- Enter the value:
- Text fields (Short Answer, Long Answer) — type any value.
- Choice fields (Checkboxes, Radio buttons, Dropdowns, Linear scales) — pick from the available options.
- Repeat to pre-fill multiple fields.
Pre-fill fields with values
Each row you add maps a field to a default value. When a respondent opens the link, these values are already filled in — they can change them or leave them as-is.
Copy the link or embed code
The output updates in real time as you add prefill values:
- Share the link — the generated URL includes a
?prefill=query parameter:https://customgform.com/form/FORM_ID?prefill=FIELD_ID=VALUE;FIELD_ID_2=VALUE_2 - Embed in a web page — the embed snippet includes a
data-prefill_fieldsattribute with the same values.
Click Copy link (or copy the embed code) and use it on your website, in emails, or on social media.
[!NOTE] Prefill values are appended as URL query parameters in the format
?prefill=fieldId=value;fieldId2=value2. Multiple fields are separated by semicolons.
Use cases
- Personalization — automatically fill in a user's name or email if they are already logged into your website.
- Contextual data — pass a product name or page title when the form is embedded on a specific product page.
- Campaign tracking — pre-fill a hidden field with a UTM parameter or traffic source so you can trace where submissions come from.
- Customer support — pre-fill account IDs or order numbers so support agents don't have to ask for them.
Dynamic implementation
You can dynamically inject values into your form depending on your platform.
WordPress
In WordPress, use PHP to dynamically output values into the embed code. For example, to pre-fill the user's email:
<?php
$current_user = wp_get_current_user();
$user_email = $current_user->user_email; // user@gmail.com
?>
<div
data-customgform="FORM_ID"
data-prefill_fields="501104403=<?php echo $user_email; ?>"
></div>React
If you are using React, pass dynamic values as props to the CustomGForm component:
import React from 'react';
import CustomGForm from '@customgform-lib/react-customgform';
function Example() {
// get email from api
const userEmail = 'user@gmail.com';
return <CustomGForm
formId="FORM_ID"
prefillFields={{
'501104403': userEmail,
}}
/>;
}Via URL query parameters
If you're sharing the link directly, you can manually build the URL:
https://customgform.com/form/FORM_ID?prefill=501104403=user@gmail.comMultiple fields are separated by semicolons:
https://customgform.com/form/FORM_ID?prefill=501104403=user@gmail.com;501104404=JohnTips and best practices
- Combine with hidden fields. Pre-fill a field and then hide it so the value is submitted without the user seeing it — useful for source tracking.
- Use clear labels. If the respondent sees a pre-filled value, make the field label explain why it's already filled (e.g. "Your email (from your account)").
- Test your links. Open the generated URL in an incognito window to verify the prefill values appear correctly.
Troubleshooting
Pre-filled value doesn't appear
- Make sure the field ID in the URL matches the field in your Google Form. Refetch the form after making changes.
- Confirm the value is URL-safe (no unescaped special characters).
Choice field shows blank instead of the pre-filled option
- The value must exactly match one of the available options (case-sensitive).
Changes not showing on the live form
- Clear your browser cache or open the form in an incognito window.