Google Forms – validating form answers
Google Forms have so many great uses, both inside of the classroom and as a productive administration tool. The power of Google Forms comes in the collection of responses into a Google Sheet which has similar basic evaluation capabilities as Microsoft Excel.
Forms collect data and as Peter Sondergaard, senior vice president at Gartner, Inc. says, “Information is the oil of the 21st century, and analytics is the combustion engine.” 1 But as we all know, unless your data has parameters and consistency in how it displays, you may not be able to quantify the results or make informed decisions. When you want the responses to questions to be in a specific format, you might have to apply validation rules. For example, if you create a text field and you are looking for a “yes” or “no” answer, you might want to limit the responses to “Yes” or “No” instead of “Y”, “yeah”, “confirmed” or “N”, “nah”, “negatory”. In Google Forms, you can set validation criteria for checkbox, text and paragraph text form fields inside the form. Each type of question validation has different settings. You can use regular expressions to help define what kind of data is acceptable. Validation looks for a specific pattern of data that is entered by users and aids in your analysis once the results are collected.
Types
The validation settings for text questions allow you to use numbers, text or regular expressions as validation tools. Within each of the validations settings there are multiple options for defining acceptable responses in order to further define the acceptable answers from your users.
For example, let’s say you want to ask users to enter their preferred phone number using dashes between the three sets of numbers. Choose “regular expression” and “matches” from the drop-down menus. Enter “^[2-9]\d{2}-\d{3}-\d{4}$” into the pattern field.
If users don’t use a “dash” then their input will be denied.
Options for paragraph question types are similar to text question types with the exception of the option to set number validation.
Checkbox Question Types
The validation setting for checkbox questions allow you to require a specific number or range of numbers from options that users select. If you ask for a specific number of questions to be answered or if you allow for a range of checkboxes you can choose from the “Select at least”, “Select at most,” or “Select exactly” from the drop down menu. Don’t forget to enter some error text so users get an idea of why their entry might be denied if they don’t follow your directions.
For example, let’s say you want users to select 3 of 4 options. Choose the “Select exactly” option and then put the number “3” in the next field. Enter error text like, “You must select 3 of the 4 options.”
For more information about using validation in Google Forms see these helpful web resources:
https://support.google.com/docs/answer/3378864?hl=en&ref_topic=6063592
https://www.labnol.org/internet/regular-expressions-forms/28380/
https://sites.google.com/site/kernkelley/forms
1. [https://www.gartner.com/newsroom/id/1824919]↩
UAF Instructional Designers
This page has been authored collectively by the experts on the
UAF Instructional Design Team.
Let us know if you have suggestions or corrections!