Difference between revisions of "Google Forms"
Jump to navigation
Jump to search
Line 72: | Line 72: | ||
{{bullet1|<nowiki>var apiKey = 'yourapikey';</nowiki>|The text ''yourapikey'' needs to be replaced with the key that we generated in the section: [[#Setup an API Key|Setup an API Key]]. Be sure to keep the quotation marks.}} | {{bullet1|<nowiki>var apiKey = 'yourapikey';</nowiki>|The text ''yourapikey'' needs to be replaced with the key that we generated in the section: [[#Setup an API Key|Setup an API Key]]. Be sure to keep the quotation marks.}} | ||
{{bullet1|<nowiki>var instanceId = 'yourinstanceid';</nowiki>|The text 'yourinstanceid' needs to be replaced with your instance ID. This can be found within the URL that connects you to your Hornbill. This should be all lowercase. Be sure to keep the quotation marks.}} | {{bullet1|<nowiki>var instanceId = 'yourinstanceid';</nowiki>|The text 'yourinstanceid' needs to be replaced with your instance ID. This can be found within the URL that connects you to your Hornbill. This should be all lowercase. Be sure to keep the quotation marks.}} | ||
− | ===Custom Fields=== | + | ===Questions and Custom Fields=== |
[[File:ScriptCustomFields.png|right|border]] | [[File:ScriptCustomFields.png|right|border]] | ||
− | Each question that you | + | Each question that you add to a Google Form can be mapped to a request's custom field. The script uses a case statement to identify the Form question using its title and map it to custom field where the response will be stored. |
+ | In this example there are three questions | ||
+ | {{bullet1|Address|A question that has the title '''''Address''''' will be added to the custom field '''''h_custom_d'''''}} | ||
+ | {{bullet1|Contact|A question that has the title '''''Contact''''' will be added to the custom field '''''h_custom_e'''''}} | ||
+ | {{bullet1|Date Of Birth|A question that has the title '''''Date Of Birth''''' will be added to the custom field '''''h_custom_f'''''}} | ||
+ | You can add, remove, rename, and choose your custom fields to match your Form questions and where you would like the responses to be stored. | ||
===Update Status=== | ===Update Status=== | ||
|}} | |}} |