Hi, guys, im new in appscript, im having this issue, please your help is needed i appreciate your help.
I want to populate data in a checkbox question with appscript.
var langQuestion = form.getItemById("1688713959").asCheckboxItem();
// populate the form checkbox question with the new language data
langQuestion.setChoiceValues(langVals);
Im paste all my code so its more easy for you:
// function to find the form ids
function encontrarFormIds(){
var form = FormApp.openById("10xnwyDWGeYfmWZAgIERmOfMupja4S3ma-YjUxlC2mhE");
var formItem = form.getItems();
formItem.forEach(function(item){
Logger.log(item.getTitle() + ' ' + item.getId());
})
}
//* Acerca de ti 1799767473
//* Nombres 1196489671
//* [20-03-19 18:16:08:028 EDT] Correo 1260985361
//* [20-03-19 18:16:08:129 EDT] Tu Experiencia codificando 1398218252
//* [20-03-19 18:16:08:295 EDT] Tienes alguna experiencia previa codificando? 556414867
//* [20-03-19 18:16:08:403 EDT] Que lenguajes de programacion usas? 1688713959
//*
//* Actualizar el formulario dinamicamente desde la Sheet
function actualizarForm(){
// get the language data from the sheet
var ss = SpreadsheetApp.getActive();
var setupSheet = ss.getSheetByName("Setup");
var langVals = setupSheet.getRange(2, 1, setupSheet.getLastRow()-1,1).getValues();
Logger.log(langVals);
//* want to add this languages to the form [[None], [Apps Script], [Python]]
//* Need to get hold of the form element to modify
var form = FormApp.openById("10xnwyDWGeYfmWZAgIERmOfMupja4S3ma-YjUxlC2mhE");
//* get the languages checkbox item
var langQuestion = form.getItemById("1688713959").asCheckboxItem();
// populate the form checkbox question with the new language data
langQuestion.setChoiceValues(langVals);