Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

Not adding calendar entry #2

@earwickerh

Description

@earwickerh

Thanks for publishing this Ian! I'd be most grateful if you could advise me on an issue I'm having. I'd happily make a donation to your favorite charity.
Nothing is being added to the calendar when i submit a form. The date/time choices show up on the form and the sheet gets updated but no calendar entry(and therefore no timeslot update either). The only changes I made to the settings were the ones described in the instructions, e.g added calendar id and I also made the trigger update every 1 minute instead of the default 1 hour.

To debug I tried to run the functions individually. Here's what I found:

  • The testHandleAppointmentRequest function works fine and adds the calendar entry.

  • The onFormSubmit function throws TypeError: Cannot read property 'namedValues' of undefined
    onFormSubmit @ line 6: handleAppointmentRequest(e.namedValues);
    Also getting undefined for handleAppointmentRequest, isOnWeekend, and updateAppointmentSignupTime.

This may be normal

I thought maybe I had contained the script in the wrong place e.g. in the form instead of the sheet double checked , it's definitely in the sheet. I followed the steps to the letter and even created 3 different sets(sheet,calendar,form).

Strange occurrence: after following all the steps, when I test a form submission, a new sheet gets created called "form responses 1" and the data goes there instead of the original "Sheet 1" that I renamed "Appointments". This happened even when i restarted from scratch.

Thanks in advance for any help you might be able to provide, and thanks again for having made this public in the first place. Have an awesome weekend!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions