I have a normal inquiry form created using Google Form. When the form is loaded with prefill URL, I want to change the form title to Training Event Registration just to set the user expectation right, e.g.:
function onFormPrefilled() {
const form = FormApp.getActiveForm(); // Use this if the script is bound to the form
// Set the new title
form.setTitle("Training Event Registration");
// Set the new description
form.setDescription("Review your roles and segments and update them accordingly before submitting your registration.");
}
I know app script may not have such onPrefilled
event, but is there a way to detect it? I know that the onOpen
event happens before the data is prefilled because it is meant to pre-populate multiple choice input from data source such as Google Sheet before the prefill system can check from a list of checkboxes or select from dropdown list. As such, using the onOpen
event to detect prefilled data is not possible.
6