Is it possible to create an index key for a Paragraph answer field?
For example:
Google Form Question: Name of cities:
|----------------------------------|
|1. |
|2. |
|3. |
|----------------------------------|
So it automatically fills "1." then when I press enter, fills with "2." and so on.
It is not possible exactly the way you described, but there are two things you can do:
- Create a form with pre-filled responses
Programmatically you can achieve this functionality with the methods withItemResponse() and toPrefilledUrl():
function prefillParagraphResponse(){
var form = FormApp.getActiveForm();
var items = form.getItems();
var paragraphItem;
for(var i in items){
if(items[i].getTitle()=="Google Form Question: Name of cities"){
paragraphItem=items[i];
}
}
Logger.log(form.createResponse().withItemResponse(paragraphItem.asParagraphTextItem().createResponse("1. \n2. \n3.")).toPrefilledUrl());
}
- Split the question in several questions
This has the advantage of all answers being stored as a separate entry of the array itemResponses, and you can programmatically assign a different index key to each one and access them selectively - if this is your purpose.