Monthly Archives: November 2019

SCRIPTfully scrape off your Google Forms Field Ids…

Y’all wanna scrape off the list of Field IDs of your Google Forms easily? yes programatically through a neat little script! Stick around y’all! 😉

So you remember my last blog posts about my journey of hacking around Google Forms, You may RESTfully submit to your Google Forms… and even in the one before, Let’s auto fill Google Forms with URL parameters… you might remember how crucial it was to hook up to the list of Field Identifiers in your Google Forms which you can use to Submit data to your Form using the REST API or even to populate the Auto filled data in the Form. Now that goes without saying this blog post is a follow up of the above two articles, therefore I would prefer if you took a sneak peak into those before continuing in this article.

So the way we retrieved the list of Field identifiers were by manually reading through the rendered HTML code and looking at the network traffic data. Specifically I introduced three methods as follows…

  • Method 1: Looking up page source HTML content.
  • Method 2: Inspecting HTML code of each field.
  • Method 3: Monitor the network traffic data.

So all those methods are completely manual, shouldn’t there be an easy way? Yes, I’ve been wondering that myself and I continued on experimenting…

Yes.. Scrape em off programmatically!

Wouldn’t it be easier if we could write a little script to retrieve the list of Field IDs in any given Google Form? Just scrape through the rendered HTML content and pick up the Field identifiers automatically! Oh think about how much time you could save! 😀

Well yes, that’s exactly what we’re going to do. Let’s build a simple script that could scrape off the list of Field IDs of your Google Forms without you breaking a sweat!

But to build the script you might have to break some sweat… 😉 Alright, so what this script is going to do is, given the link of a Google Form, it will load the HTML content of it, and scrape through it to find the elements that holds the Field Ids, filter them out and return the results! Quite straight forward eh! 😀

Let the hack begin…

Let’s use a dot net C# to write out script, and yes an absolutely biased choice given my favorite platform! lol But if you can grasp the process and idea behind each step you could easily reproduce the same script from any other language or framework!

It’s all about programming the our method of manually reading through the HTML code and figuring out the IDs, into a self executing code. This requires us understanding the pattern of which the HTML is rendered for each Field element in the Google Form, and I figured this out by repeatedly looking at the rendered HTML content. Once we understand the pattern and where to filter out the data that we need to scrape out, we can easily code it into our script.

Now for this post also let’s use the same sample questionnaire Google Form that I created for last post’s demo.

https://docs.google.com/forms/d/e/1FAIpQLSeuZiyN-uQBbmmSLxT81xGUfgjMQpUFyJ4D7r-0zjegTy_0HA/viewform

So now we got a Google Form, let’s start the little hack by finding the field IDs in the form…

Identify the Pattern..

Now this is the most crucial step, let me walk you through by simply looking into the rendered HTML content of our Google Form.

Now for me though it took a lot of trial and error steps to recognize how all different types of question fields are rendered in Google Forms, where by created a bunch of sample Forms and analyzed their HTML structure continuously, until I was sure. 😉

I’ve explained regarding this pattern in my previous blog post: Let’s auto fill Google Forms with URL parameters… in which I dive into detailed steps of finding the IDs of each question field in your Google Form. If you go through it and focus on the section “Method 2: Inspecting each field” you could easily understand what I’m about to dive into. Therefore let me keep things simple in this article just to avoid repetition. 😀

Assuming you’re using Google Chrome let’s begin, by right clicking on any of the question fields in your Google Form and go to -> Inspect Element menu option.

If you carefully take a look at the rendered HTML node of our Short Answer question Field, it’s actually “input” type element and you can see how the “name” property holds the ID for the Field “entry.1277095329”. Now let’s take another type of an Field, how about Multiple choice selection question Field? 😮

When you’re reading through the parent node of the radio button elements, you can see at the bottom there’s an “input” type element, that’s set to hidden, with the Field ID that we’re looking for. Then how about a Checkbox selection Field? Let’s try the same inspection and see for ourselves… 😉

Now the parent node of it is a bit differently structured, but you can see how it follows the same pattern, of having an “input” type element which holds the ID of the question Field.

Also something to notice is that the same exact child node is repeated in each parent div element containing the ID value. And then just above the child elements, you got another field which carries the same values, but with a “_sentinel” suffix in the “name” property, which sorta creates a repetition of data that needs to be filtered out. So this is something you need to keep in mind, that we will need to filter out in our script. 😀

Next let’s try out a Paragraph question Field of Google Forms, and try to analyze it.

Now this fella got a “textbox” type element rendered, which also includes the “name” property that holds the Field ID, and now we know another element that needs special filtering in our script! 😉

Finally all the other types of Questions Fields in Google Forms follows almost the same pattern of rendered HTML, therefore without further adieu let’s try to analyze the patterns which we seen behind those elements.

Analyze the Pattern…

Now in this step you need to be able to see the full picture of the whole pattern of which those Google Forms question Field elements are rendered in their HTML environment. So after analyzing all those different fields we could draw a few major analysis that we need to keep in mind when we’re thinking of scraping out the Field IDs from the HTML…

  • “input” elements holds the Field IDs in their “name” attribute
  • “textarea” is an exceptional element which is used by Paragraph question type
  • the Field ID value begins with “entry.” prefix in the “name” attribute
  • Checkbox Field elements renderes a repetition of its “input” nodes
  • Also Checkbox Filed generates an extra “input” element with “_sentinel” suffix in ID
  • repeated nodes with same values should be filtered out

Now keeping all those in mind we need to implement the logic into our script, or in other words we need to code the above logic and filtering as rules into our little script that’ll scrap out the HTML of our Google Form to retrieve the Field IDs automatically.

Let the coding begin!

Assuming that you’re already experienced in dotnet, I’m not going to be diving in to spoon feeding details here, and rather focus on the important bits of the code. We’re going be using dotnet and C# as the language for our crawler script. And we need a library that could parse HTML content, and traverse through those content programmatically. Therefore I choose HTMLAgilityPack which is a well known and stable HTML parser for dotnet projects.

So the project type that you’re going to implement is totally up to you, but for this demo I would be using a Console Project in dotnet, pretty simple to begin with.

Given you have added the HTMLAgilityPack to your dotnet project, let’s create the method definition with a string parameter that will represent the URL link of our Google Form that we need to scrape off and it will be returning the list of Field IDs of the given Google Form!

Oh and make sure to make it an async method, hence we will need that for our web call that’ll load the HTML content.

Let’s use the HtmlWeb class which allows us to load an HTML content from a given url string asynchronously.

There we’re executing the LoadFromWebAsync() upon the given Google Forms Link and load it into memory. Next we need to implement out first line of filtering on top of the HTML content that we loaded into memory.

There we’re scooping off the “input” and “textarea” elements from the HTML content,  into a List object of type IEnumerable<HtmlNode>, given the DocumentNode which contains all the HTML elements of the Google Form that we just parsed into memory.

Like I said before we’re basically implementing the logic that we learned in the Pattern Analysis step, therefore next we go on to the next layer of filtering.

There we’re filtering the list of data based on the predicament, that we retrieve all the HTML elements which contains the “entry.” prefix in their “name” attribute, thus securing out Field ID values. Then we exclude all the elements that contains “_sentinel” suffix in their “name” attributes which governs the cleaning up of Checkbox field element repetition.

As you see above we’ve singled out the HTML elements that we’re targeting. Next we gotta do some final clean up of our scraped nodes.

We need to clean up any existing duplicate elements in the list, therefore we’re gonna group similar items, and pick the first element into a list of type List<HtmlNode>, which will eliminate the repetition nodes probably caused by Checkbox fields.

And finally we’re going to access the each Node’s “name” attribute, load it into a List.

And return the results. Oh just an add-on I’m printing out the scraped off Field ID elements into the Console.

Let me share the whole script down here…

Let’s try it out shall we! 😉

Hit F5!

Now I’m gonna use the sample Google Form that I created for this demo, pass its URL link into this little script, and hit F5 in Visual Studio!

Look at that beauty! 😉 The complete list of Question Field identifiers in my sample Google Forms just like we expected.

As far as my testing this little script works perfectly for any Google Form that contains the basic main types of Question Fields that are available in Google Forms as of this day!

Well… That’s it!

Basically you can scrape off any data from a given HTML content as long as you understand the pattern of which the HTML rendered targeting the pieces of data that you’re looking for! Likewise there could be many different types of Google Forms that contains different types Question Fields even with custom content in them, but at the end they all follow a certain HTML rendering pattern, which is just a matter of figuring out.

I would like to remind you again, the reason I considered this as a “SCRIPT” is due to the possibility of converting the same HTML scraping steps into any other language or framework easily, as long as you understand the pattern of the rendered HTML of your Google Form!

Now keep in mind all these are simple hacks and tricks derived by careful observation of rendered HTML content of any given Google Forms page, and we do not have precise control whether Google will change these format and rendering patterns in future, so you gotta keep an eye out if you’re planning to use these hacks for a long term solid implementation.
My suggestion would be to write up a series of Test cases (TDD yo!) which would test for the above process flows to make sure they’re working as expected and notify you in case of any changes from Google. 😉

There you have it, the little magic script to scrape off the list of Field IDs from your Google Forms page!

Share the love! 😀 Cheers!

You may RESTfully submit to your Google Forms…

You wanna submit responses to your Google Forms in a REST-ful API call, or rather programmatically in code or easily from a Postman-like tool? Then you’re welcome to stick around here… 😉

So you remember my last post on my journey of hacking around Google Forms, trying to be a smart-ass eh! Let’s auto fill Google Forms with URL parameters… Oh yeah that one right there, well that was just the tip of the ice berg of me playing around with Google Forms! Let me share the next set of cool tricks I figured out here! 😀

This little trick of submitting data RESTfully to your Google form, could become very handy if you wanted to build your own improved custom UI for submitting data to your Google Form, along with your own validations for the fields or even to quickly populate a bunch of sample data from your Form for experimental reason. Them awesome possibilities are endless! 😉

Well.. Google Forms with RESTful ?!?

So during my adventures into messing around with Google Forms, I figured out that we can submit data into our Google Forms using their REST API endpoint! So how cool is that eh, we can directly post data into our form RESTfully, from whatever the medium you prefer, programmatically, or Postman like tool! 😉

So in this post lemme share that cool trickery bits with you…

Let the hack begin…

Now keep in mind unlike the last post, this is a bit advanced trick which requires some experience on HTML and web development, well it could easily help at least.

We’re gonna get the REST endpoint source of our Google Form, package our question-field-answer data into a request object and submit it to the REST endpoint directly, using Postman or Programmatically in code.

Now for this post also let’s use the same sample questionnaire Google Form that I created for last post’s demo.

https://docs.google.com/forms/d/e/1FAIpQLSeuZiyN-uQBbmmSLxT81xGUfgjMQpUFyJ4D7r-0zjegTy_0HA/viewform

Little sneak peak:

So now we got a Google Form, let’s start the little hack by finding the field IDs in the form…

Yes, you still gotta hook up the fields!

Remember in my last post I explained about the Fields in our Google Form having unique identifiers (or IDs) that we can use to attach data into for submission? well you still need em! 😛

Now for this you could still use the methods we discussed in the previous post to get the list of ID of the fields in your Google Form, but this time I’ll introduce some easier ways, since we’re moving to a bit advance trick…

Hooking up to the fields and Endpoint…

Keep in mind this requires a little bit experience in web dev! 😉 Basically we’re going to get the list of Field IDs by tracing the submission request call in our Google Form, which will also help us figure out the REST endpoint link.

So open up your Google Form in Chrome browser and open up developer tools by using the browser menu or on Windows click “Ctrl+Shift+I keys” in the keyboard.

Now to make the magic work, go to “Network” tab in the menu list which will allow us monitor the network trace that’s going to be sent from browser to Google Form submission REST endpoint.

Next, you need to fill up all the question fields in your Google Form and hit submit button. Carefully watch what happens in the developer console!

Yep a whole bunch of logs pops up, which shows you the traces of all the network calls that occurred in the last “Submit” button click. And in there the most important request log is the “formResponse” log as you seen above.

Click on formResponse log which will bring up all the details on it.

Now this is quite awesome, it will show you in 4 separate sections all the details about the Google Form submission data endpoint that just occurred.

https://docs.google.com/forms/d/e/1FAIpQLSeuZiyN-uQBbmmSLxT81xGUfgjMQpUFyJ4D7r-0zjegTy_0HA/formResponse

The Request URL is the endpoint we’re going to be using to submit our form data and the Form Data section is where you’ll find the list of field identifiers of your Google Form.

Now that your holy grail of list of field identifiers in bulk. So go ahead, highlight that chunk of text and copy it up to some notepad to be used later.

Now if you noticed the ID with the “entry.1155533672_sentinel” is something that you can ignore, since its a repeated field coming from the Check box question field in your Google Form!

Just like that you can easily extract the list of IDs of the fields in your Google Form! 😀

entry.1277095329: Bibimbap Turtles
entry.995005981: Banana Plums
entry.1155533672: Dogs with hats
entry.1579749043: Jumping Apples
entry.815399500_year: 2019
entry.815399500_month: 11
entry.815399500_day: 11
entry.940653577_hour: 00
entry.940653577_minute: 30

Now that’s the form data sample from my Google Form! 😉

Shove it up into a Postman!

Or any of the web dev tools you prefer to make a simple REST api call. Up to you! lol. Let’s create a POST call with our Google Forms submission API endpoint which we retrieved in the above step.

https://docs.google.com/forms/d/e/1FAIpQLSeuZiyN-uQBbmmSLxT81xGUfgjMQpUFyJ4D7r-0zjegTy_0HA/formResponse

Actually this URL you could easily make up using your Google Form publish url, just by replacing viewform with formResponse suffix.

So make sure to add the Body parameters of type x-www-form-urlencoded, and list out all the question field IDs and their values you’d like to inject in to the submission. Since then you need to apply header Content-Type as application/x-www-form-urlencoded which will enable our body parameters object.

Assuming you have set up all the body form fields properly, let’s fire it up! 😀

Fire it up!

Let’s go ahead and execute the REST posting! Hit “Send“, and bam!

You should get a successful 200 Status Code response with the above success message “Your Response has been recorded.” inside a whole bunch of HTML content and if you move to the “Preview” tab, you can see how the rendered UI being returned as well.

Now let’s say if you missed adding any specific field in the request body, that was already marked as “Required” in your Google Forms template, and you had hit “Send”. In that case it would return a bad request 400 Status Code with the error in HTML content, “This is a required question”, or with whatever the custom error message you configured your Google Form with.

Yeah you can even view in the Preview tab with the rendered HTML content.

Pretty neat eh! the same way it would behave in a browser environment you can duplicate in a RESTful environment such as Postman! 😀

Now let’s see how easy it is to push that into some code and execute this programatically!

Shove it up into a Code snippet!

Alright let’s shove that into a simple C# snippet where we could POST a simple HTTP request with the body parameters of our Google Form! Basically replicating the same execution as Postman you saw above! 😀

Above we’re using a simple dotnet HttpClient to execute our Google Form submission REST post call, by adding the body values dictionary into the request.

And then we’re printing the Status Code and the HTTP content response we get.

Hit F5!

If you hit F5 on the above code in Visual Studio, you should get the following.

We are successfully submitting our Google Form data to the REST endpoint and getting the success code, along with the usual HTML content, same as how got in Postman. 😉

Now let’s say if something went wrong, or you missed a required field in your request body,

It will show up the same error handling we got in Postman, as 400 Bad Request! And if you dive into the HTML content, you can see how the error message was also delivered back.

So now you know how to programmatically submit data to your Google Forms in code! 😉

Imagination is the limit yol! 😉

Well… That’s it!

It’s quite straightforward how Google has built these forms in such a simple manner for you to handle them easily as you wish. Kudos Google!

Now keep in mind all these are simple hacks and tricks derived by careful observation of html code and network traffic, and we do not have precise control whether Google will change these format and rendering patterns in future, so you gotta keep an eye out if you’re planning to use these hacks for a long term solid implementation.
My suggestion would be to write up a series of Test cases (TDD yo!) which would test for the above process flows to make sure they’re working as expected and notify you in case of any changes from Google. 😉

You can do all kinds of cool stuff with it! So there you have it, how you may RESTfully submit to your Google Forms!

Share the love! 😀 Cheers!

Let’s auto fill Google Forms with URL parameters…

Wanna auto fill and populate your Google Forms with data by injecting values from the URL itself? Then you’re at the right spot. 😉

So I happened to be playing around with Google Forms recently and came across this requirement to pre-populate some data in my Google Form, which led me to come across this simple solution to automatically fill data in the fields of the Google Form by injecting values in the URL targeting the required fields.

Google Forms, a secret?!

Google Forms are simply, nothing but just a list of fields where the user is required to enter data into and submit.

To my surprise when I was hacking around with it, I noticed that Google Forms allows us to attach URL parameters that could target the fields in the form, and pre-populate them with the given parameters. This is probably a not so well known fact, and works like a charm as long as you scrape out the unique identifiers of the fields.

but many types of Fields..?!

There are many different types of fields that could consist in a Google Form, Text fields, Multiple Choice, Check boxes, Drop down, Date and Time selection fields… and so on. But one thing in common among all those different types of fields is that they all have a specific unique identifiers that represents them, so as long as we nicely grab those unique IDs we’ve got the hook to attach values to them on the loading of the page! 😉

Let the hack begin…

For this simple hack I have created a simple Google Form with a bunch of fields in it to enter data and submit. Just another regular Google Form, containing several fields in different types, to demonstrate how to successfully pass values into them no matter the type of each field.

https://docs.google.com/forms/d/e/1FAIpQLSeuZiyN-uQBbmmSLxT81xGUfgjMQpUFyJ4D7r-0zjegTy_0HA/viewform

Little sneak peak:

So now we got a Google Form, let’s start the little hack by finding the field IDs in the form…

Hooking up to the fields…

In order to understand this little hack, you need to treat each question in the Google Form as a field of its own existence, which can be represented by a unique identification that we can use to call upon to attach data into it.

Now let’s try to hook up to the fields of our Google Form by looking up their IDs. There are few ways to hack around to find the IDs, whichever you’re most comfortable you may proceed with…

Method 1: Looking up page source HTML content

One way is to look into the HTML content of our Google Form and manually search for our field identifiers. So open up your Google Form in a web browser and right click on the page -> click on “View Source” option.

Then it will open up the HTML code of the page. Alright now we got the access to the HTML content of our Google Form, let’s hunt for our IDs of question fields. The IDs you’ll find are in the format of, entry.XXXXXXXXX.

So now we know the format of the IDs, let’s search for them using the suffix “entry.”, so click “Ctrl + F” on your keyboard, and type “entry.” which will then highlight all the ID values in the HTML content of the page.

Each and every one of those highlighted search results represents a field that you need to enter data into in the Google Form. If you just read through the surrounding content of those IDs, you’ll see that they’re mapping to each question field in our Google Form.

You can just take a note of the list of entry values popping up in that search result to prepare for our next step.

There’s also another way…

Method 2: Inspecting each field.

Right click on any field -> Click on “Inspect” option, which will open up the HTML code of the specific element that you focused on.

As an example, in the above Text field, when we inspect its HTML content, it shows the “input” element. If you carefully read the HTML code there, you can see how that node has a property called “name” which has the value “entry.1277095329” as you can see above. TADAA! there you have the ID of that specific field.

You can easily find all the identifiers or IDs of the Fields easily in either ways above, so go ahead with whichever you find easier. 😉

Oh, different types of field eh! 😮

So in Google Forms we have many different types of Question Fields that are provided,  such as Drop down selection fields or Check box selection fields, etc. Therefore something to keep in mind is that all those different types of fields, may have their IDs assigned to them differently, because their HTML content is differently structured and rendered.

As you can see above, in the Google Forms designer console, you can see the different types of Question Fields it provides for the users.

Let me show some examples which might help you to track down their IDs! 😉

How to find the ID of a Multiple Choice field?

So one of the tricky fields is the Multiple Choice field in a Google Form. You gotta right click -> Inspect element, where you’ll see a list of Radio button elements attached to the parent “div” element.

Then at the bottom of the parent “div”, you have a hidden “input” field with the ID that we are looking for, that we can use to target in our little hack! 😉

How to find the ID of a Drop down field?

Well this one is quite the same for previous one where you’ll the hidden “input” field at the bottom of the parent “div” element.

You can see in the HTML content how the checkbox options at the top of the list and the bottom containing the ID field with “entry.xxxxxxxx” similarly.

How to find the ID of a Check Boxes field?

Sam as before you have to inspect HTML content of each element of the Check boxes field to get the ID. This will be attached to the “div” as a hidden “input” field, being assigned the same ID for each Checkbox element in the question. Which sorta makes it easier for us to take out the Field ID just by inspecting a single Checkbox element in the question.

As you can see same ID value is assigned to each Check boxes field in the question. 😉 Easy peasy eh!

How to find the ID of a Date selection field?

Well this is a little unique, just go ahead right click to “Inspect” the element as usual in your Chrome. Here you’ll see somewhat similar to the above but with three hidden input fields.

There’s going to be three “input” hidden fields with the ID for each “Year”, “Month”, “Day” selection in a Date selection field. So you need to keep a track of those three IDs, “entry.xxxxxxx_year”, “entry.xxxxxxx_month”, and “entry.xxxxxxx_day” to send a complete data to fill the date selection field.

How to find the ID of a Time selection field?

This is very much similar to Date selection where as you got IDs assigned for “Hour” and “Minute” fields of a Time selection field.

But you need to keep in mind each of those two nodes are inside two separate parent “div” elements as shown above. Anyhow take a note of the “entry.xxxxxxx_hour”, and “entry.xxxxxxx_minute” fields above which are the IDs you’re going to require to set the values for your Time selection.

Well I assume that’s plenty of examples on how to hunt down the field identifiers in your Google Form. Any other given type of field should somewhat follow the same pattern with their hidden fields with the IDs, and it should be easy to figure out as long as you’re comfortable with reading simple HTML content!

Now according to my sample Google Form, following are the IDs of the fields available..

  • entry.1277095329
  • entry.995005981
  • entry.1155533672
  • entry.1579749043
  • entry.815399500_year
  • entry.815399500_month
  • entry.815399500_day
  • entry.940653577_hour
  • entry.940653577_minute

Off to next step then…

Then let’s fill the data…

Alright now we got all the field identifiers in our Google Form, next let’s move on to generating the URL that allows us to inject all those data into the fields. It’s actually quite easy as follows…

entry.xxxxxxxx1=This is answer 1

Given our Google Form link…

https://docs.google.com/forms/d/e/XxxxXXXxxxXXXx/viewform

We shall attach the all the field ID’s and their injected answers as follows…

https://docs.google.com/forms/d/e/XxxxXXXxxxXXXx/viewform?entry.xxxxxxxx1=This is answer 1&entry.xxxxxxxx2=This is answer2

We just have to pass the value assigning it to the question field ID, and attach it to the link of the Google Form. Navigating to the above link will present your Google Form with all the fields pre-filled with answers you parsed. More about it below..

Pass the values targeting the fields…

This is something you need to pay extra attention when it comes to the syntax of the URL, making sure to pass the proper field ID’s and their answers, and separating them properly in the URL without a mistake.

Let’s first take a look at how we’re assigning values to the list of fields in my sample Google Form…

  • entry.1277095329=Jumping Beans
  • entry.995005981=Banana Plums
  • entry.1155533672=Dogs with hats
  • entry.1579749043=Running Banana
  • entry.815399500_year=2019
  • entry.815399500_month=10
  • entry.815399500_day=28
  • entry.940653577_hour=03
  • entry.940653577_minute=04

Now those field IDs and their targeted answers should be merged into a URL. So let’s add the separation tag with ‘&’ and put them together accordingly.

https://docs.google.com/forms/d/e/1FAIpQLSeuZiyN-uQBbmmSLxT81xGUfgjMQpUFyJ4D7r-0zjegTy_0HA/viewform?
entry.1277095329=Jumping Beans&
entry.995005981=Banana Plums&
entry.1155533672=Dogs with hats&
entry.1579749043=Running Banana&
entry.815399500_year=2019&
entry.815399500_month=10&
entry.815399500_day=28&
entry.940653577_hour=03&
entry.940653577_minute=04

You can see how the fields value assigning nodes are separated with the ‘&’ separation to be merged into a single URL and the complete URL should be formed as follows…

https://docs.google.com/forms/d/e/1FAIpQLSeuZiyN-uQBbmmSLxT81xGUfgjMQpUFyJ4D7r-0zjegTy_0HA/viewform?entry.1277095329=Jumping Beans&entry.995005981=Banana Plums&entry.1155533672=Dogs with hats&entry.1579749043=Running Banana&entry.815399500_year=2019&entry.815399500_month=10&entry.815399500_day=28&entry.940653577_hour=03&entry.940653577_minute=04

Now if you click on the above link, it will show how my sample Google Form is pre-filled with all the answers I passed in the URL targeting each field.

Fire it up!

TADAAA! 😀 Pretty cool eh!

You can cross check with the values I have passed in the URL with the values that are auto-filled in the Google Form! 😉

Something about multiple choice fields…

One thing to keep in mind is that, when it comes to fields that you have to select values, such as Multiple choice fields, Drop down selection fields and so on, they need to be assigned with exact values already given in their list of answers. 😉 Otherwise the values injected will be ignored by the form, and rendered as empty. 😦

Well… That’s it!

You don’t have to set values for all your fields in the URL parameters, just include the ones you’re intending to fill up is enough. This could become very handy if you want to auto fill fields like “date and time fields” for the ease of your users or if you want to populate pre-set default values in your Form for your targeted users. Another aspect this could be handy is when you need an easy and quick way to generate some sample data from your Google Form submissions. 😉

So there you have it, how to easily pre-populate data in your Google Forms!

Share the love! 😀 Cheers!