I want to create a google form that is used for my customers to inform me whenever they want to buy something from me.
The google form is simple, it is filled with short questions of list of on sale item that ask about the quantity of item that they want to buy. It is so that whenever my customers want to buy anything they will just have to fill or answer the questions with quantity that they want to buy for each item.
Problem is, the items constantly change and I always update it in a specific google sheet. It is very troubling that I have to update my google form every time the item list is changed.
Is there any way to auto-populate my google form question from my google sheet (perhaps with app script)?
The question is always "short answered" question type with qty bigger than 0 as data validation. It is not a multiple choice, not a dropdown or anything else.
The number of types of goods sold is also vary from around 20 to 40 items. So the number questions in google form can also change due to this fact.
For instance, this is a snapshot of the short question. Very brief and simple question.
This answer addresses the main requirements for updating textItems (Short Answer) in an existing Form.
ASSUMPTION: sale items begins with a
FormApp.ItemType.PAGE_BREAK
.This is important because it creates a point where sale items can be deleted/created
PROCESS
deleteItems()
createNewSaleItems
BEFORE
AFTER
SPREADSHEET: ADD NEW ITEMS