Google Apps Script API
    Preparing search index...

    A question item that allows the respondent to indicate a length of time. 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 duration item.
    var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
    var item = form.addDurationItem();
    item.setTitle('How long can you hold your breath?');
    
    interface DurationItem {
        createResponse(
            hours: number,
            minutes: number,
            seconds: number,
        ): ItemResponse;
        duplicate(): DurationItem;
        getGeneralFeedback(): QuizFeedback;
        getHelpText(): string;
        getId(): number;
        getIndex(): number;
        getPoints(): number;
        getTitle(): string;
        getType(): ItemType;
        isRequired(): boolean;
        setGeneralFeedback(feedback: QuizFeedback): DurationItem;
        setHelpText(text: string): DurationItem;
        setPoints(points: number): DurationItem;
        setRequired(enabled: boolean): DurationItem;
        setTitle(title: string): DurationItem;
    }
    Index

    Methods