This file contains instructions on how to install the script hosted in this project for your own use. There is no proper 'install' feature for Google Drive so manual action is required.
-
Open an existing Google Form or create one as you would normally.
-
Click on the 'dots' icon next to the Send button and choose the script editor option. This will open a new tab.
-
The script editor tab will display any script files that are attached to your chosen form. If you are doing this for the first time, you will only see a placeholder file
Code.gs
. -
If your form has existing scripts, it is recommended that you delete them, as this script contains many files. If you absolutely need to retain existing functionality, make sure that each file and function name is unique as to prevent conflict. If any files have global variables, they should be uniquely named throughout the entire project.
-
Inside the 'script' folder within this repository, create extra files corresponding to each local script file. Copy the contents of each .js file and paste them into the corresponding .gs file in your Google Sheets script. After all files have been copied, click the Save project button next to the Run button.
-
Now that the scripts have been attached to the form, click on the Clock icon on the left sidebar to access the triggers. Then click on the + Add Trigger button. This will allow you to set a particular function to run automatically under certain circumstances such as whenever the form is opened, or when a submission is made.
-
As for the trigger settings, choose the following options:
- Function: runSubmissionToPDF
- Deployment: Head
- Event Source: Form
- Event Type: on Form Submit
-
Once the trigger has been configured with the above options, click Save
-
To configure the script, open the
options.gs
file and edit the 'scriptSettings' global object. For more information on how to do so, see Configuration. -
Close the script tab and refresh the form.