How to Add Hidden Fields in the Form

Hidden fields help you capture additional information about a user that you already know but the user would not be required to enter that information on the form.

When the user fill and submits the form, the hidden field would also be saved in your Google Sheet just like regular form fields and would also be part of the email notifications.

With hidden fields, you can not only add personal information in the form without requiring the user to fill it but also track where the respondents came from. For instance, you can have a source hidden field and the value of the field can be set to Twitter or Facebook or Blog depending on where that form link is shared.

Add Hidden Fields#

The process for adding hidden fields in your File Upload Form involves URL parameters, similar to the way we constructed the pre-filled forms.

Your form URL looks something like this:

https://script.google.com/xyz/exec

To add a hidden field to the URL, we add a question mark ? after the form URL, then add the hidden field name, followed by an equal size = and the pre-filled value.

Our new URL would thus read:

https://script.google.com/xyz/exec?Source=Blog

To add a second hidden field in the same URL, add an ampersand & and the key-value pair.

https://script.google.com/xyz/exec?Source=Email&Campaign=New%20Customer
tip

The hidden fields will work in embedded forms as well.