Reputation: 3
I want to be able to delete a single choice from a question on my form through gscript without deleting the entire question and I'm not sure if this is even possible to do
Upvotes: 0
Views: 522
Reputation: 50443
function removeOption1() {
var cbItem = FormApp.getActiveForm()
.getItems(FormApp.ItemType.CHECKBOX)[0]
.asCheckboxItem();
cbItem.setChoices(
cbItem.getChoices().filter(function(choice) {
return choice.getValue() !== 'Option 1';
})
);
}
Upvotes: 3