Google Apps Script API
    Preparing search index...

    A question item that allows the respondent to enter a single line of text. Items can be accessed or created from a Form. When used in a quiz, these items are graded.

    // Open a form by ID and add a new text item.
    var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
    var item = form.addTextItem();
    item.setTitle('What is your name?');
    
    interface TextItem {
        clearValidation(): TextItem;
        createResponse(response: string): ItemResponse;
        duplicate(): TextItem;
        getGeneralFeedback(): QuizFeedback;
        getHelpText(): string;
        getId(): number;
        getIndex(): number;
        getPoints(): number;
        getTitle(): string;
        getType(): ItemType;
        isRequired(): boolean;
        setGeneralFeedback(feedback: QuizFeedback): TextItem;
        setHelpText(text: string): TextItem;
        setPoints(points: number): TextItem;
        setRequired(enabled: boolean): TextItem;
        setTitle(title: string): TextItem;
        setValidation(validation: TextValidation): TextItem;
    }
    Index

    Methods