Google Apps Script API
    Preparing search index...

    A question item that allows the respondent to select one or more checkboxes, as well as an optional "other" field. Items can be accessed or created from a Form. When used in a quiz, these items are autograded.

    // Open a form by ID and add a new checkbox item.
    var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
    var item = form.addCheckboxItem();
    item.setTitle('What condiments would you like on your hot dog?')
        .setChoices([
              item.createChoice('Ketchup'),
              item.createChoice('Mustard'),
              item.createChoice('Relish')
        ])
        .showOtherOption(true);
    
    interface CheckboxItem {
        clearValidation(): CheckboxItem;
        createChoice(value: string): Choice;
        createChoice(value: string, isCorrect: boolean): Choice;
        createResponse(responses: string[]): ItemResponse;
        duplicate(): CheckboxItem;
        getChoices(): Choice[];
        getFeedbackForCorrect(): QuizFeedback;
        getFeedbackForIncorrect(): QuizFeedback;
        getHelpText(): string;
        getId(): number;
        getIndex(): number;
        getPoints(): number;
        getTitle(): string;
        getType(): ItemType;
        hasOtherOption(): boolean;
        isRequired(): boolean;
        setChoices(choices: Choice[]): CheckboxItem;
        setChoiceValues(values: string[]): CheckboxItem;
        setFeedbackForCorrect(feedback: QuizFeedback): CheckboxItem;
        setFeedbackForIncorrect(feedback: QuizFeedback): CheckboxItem;
        setHelpText(text: string): CheckboxItem;
        setPoints(points: number): CheckboxItem;
        setRequired(enabled: boolean): CheckboxItem;
        setTitle(title: string): CheckboxItem;
        setValidation(validation: CheckboxValidation): CheckboxItem;
        showOtherOption(enabled: boolean): CheckboxItem;
    }
    Index

    Methods