Pre-Populating Google Forms

So you’ve got your Google Form integrated with your WordPress site and it looks great.  Awesome.  You know what would make it more awesome?  If I could pre-populate the form with the default answers!  Guess what?  You can!  Google Docs has a Help Page on pre-populating Google Forms and you can use that guidance to pre-populate the forms you embed on your WordPress site with the WordPress Google Forms (aka wpGForm) plugin.

For example:  I have a Test Bed that I use when developing wpGForm.  Using the following short code, I can pre-populate the form with some answers.  Setting the default values does require you to look at the form detail, this is accomplished by looking at the HTML source for the field you’d like to pre-populate (using Google Chrome’s “Inspect Element” feature or something similar in FireFox or IE) and finding the “id” attribute for the field.  On the Test Bed form the first field asks for a name and it’s attribute id is “entry_0”.  All of the fields will have an attribute id with a similar name.

By using the short code below I am going to set the following fields:

  • Name (entry_0):  Brave Sir Robin
  • Quest (entry_1):  I seek the Holy Grail
[gform email='on' prefix='wpgform_' form='']
WordPress Google Form Test Bed
This form is used to test the WordPress Google Form Plugin.
* Required
What is your name? *
Please enter your name.
Your answer
What is your quest?
Please enter your quest.
Your answer
Geographic Location *
Where in the world are you located
What keeps you awake at night?
What do you noodle on when your mind wanders.
Your answer
Do you use WordPress? *
Indicate whether or not you are a WordPress user.
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google.

2 thoughts on “Pre-Populating Google Forms

  1. Hi. The gform shortcode is deprecated. Can fields be pre-populated with the wpgform shortcode?

Leave a Reply