我認爲這可以幫助你,如果你想用觸發器寫你的谷歌腳本!
function doGet() {
var app = UiApp.createApplication().setTitle("formulario");
var panel = app.createVerticalPanel().setId("panel");
var labelAsk = app.createLabel().setId("ask").setText("MY QUESTION IS HERE");
var value = app.createListBox().setId("value");
value.setItemText(0, "Choose");
value.setItemText(1, "1");
value.setItemText(2, "2");
value.setItemText(3, "3");
value.setItemText(4, "4");
var button = app.createButton().addClickHandler(handler).setId("button").setText("send");
var handler = app.createServerHandler("check").addCallbackElement("panel");
button.addClickHandler(handler);
panel.add(labelAsk);
panel.add(button);
app.add(panel);
return app;
};
function check(e){
try{
var value = e.parameter.value;
switch(value){
case "1": change option in cell of spreadsheet;
case "2": change option in cell of spreadsheet;
case "3": change option in cell of spreadsheet;
case "4": change option in cell of spreadsheet;
default: change option in cell of spreadsheet;
}//end if
}//end try
catch(e){ error_en_e_parameter_value}
return app;
};
您是使用Google表單還是您自己使用UI服務設計它? –
@Sergeinsas我沒有關於UI服務的知識,我只是使用Google Form。 – Mebulo