I have this form:

If you see List Items - Student Name and Grades are getting populated from a Google Sheet.
What I want to do now is upon selection of List Item Grade, show only those students that belong to that particular grade in the "Select Student" selection...
How can it be done, because form has only two triggers: onOpen and onEdit?
As far as I know, this type of client side event does not exist in Google Forms. The scripting mechanisms of Google Apps Script are designed for creating forms and other documents, but do not reach very far for client-side functionality.
What I suggest is that you split the form into multiple pages and use the "Go to page based on answer" feature to achieve your desired functionality.
Use form.addPageBreakItem() to create pages and use the item.createChoice(value, PageBreakItem) to navigate to the correct page.
References:
Google Apps Script Forms Service
addPageBreakItem
createChoice
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With