Skip to content

Use this field plug-in to create Google Calendar events.

License

Notifications You must be signed in to change notification settings

isabella232/create-google-event

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create Google Calendar event

Description

This field plug-in creates a Google Calendar events using data entered into SurveyCTO Collect. Use this field plug-in to create calendar events for interview follow-up appointments and other work that needs to be scheduled as part of your data collection.

Only the title parameter is required, with the others being optional, but it is recommended that you also supply the start_date parameter when generating an event. This also works offline in SurveyCTO Collect on Android.

When using this field plug-in in web forms, keep in mind that the date selected will be converted to UTC time (to learn more, check out our support article on constraining time fields in form designs ). Because of this, when using this field plug-in in web forms, select the "Greenwich" time zone. That way, when the Google Calendar app is opened, it will be converted back to the local time zone.

Note: Support for iOS is pending in the current field plug-in version.

Download now

Features

  • Create an event in Google Calendar by clicking/tapping a button
  • Customization of the event based on field plug-in parameters

Data format

Depending on the parameters that were supplied, a response like the following will be stored:

[2020/07/04, 15:38:45] The following parameters were used: My birthday;Barbecue with friends and family. ;2020-09-01 17:00;2020-09-01 21:00;12 Country Lane;;Africa/Johannesburg;;;.

The date and time in the square brackets at the start is a timestamp when the event creation button was pressed, and does not confirm that the event was actually created.

How to use

Getting started

  1. Download either the basic sample form or the advanced sample form from this repo and upload it to your SurveyCTO server.
  2. Download the create-google-event.fieldplugin.zip file from this repo, and attach it to the sample form on your SurveyCTO server.
  3. Make sure to provide the correct parameters (see below).
  4. In a form, press the Google Calendar icon button to generate an event.
  5. In SurveyCTO Collect, pick the Google Calendar app if prompted to complete the action to create an event offline.
  6. Save the Google Calendar event, then return to Collect.

Parameters

Key Value
title (required) Event title.
start_date (optional, but recommended) Date and time in YYYY-MM-DD HH:MM format, or date in YYYY-MM-DD format if it is an all-day or multi-day event. Use the format-date-time() SurveyCTO function to format correctly. If not specified, then the time will be the next half-hour (e.g. if the event is created at 4:14 PM, then the default time will be 4:30 PM).
end_date (optional) If not specified, defaults to one hour after the start_date. If specified, must be the same as or later than the start date and time. If the start_date has no time value, then end_date must also have no time value.
description (optional) The event description.
location (optional) Adding a valid address into the location field enables features such as "time to leave" or displaying a map with directions.
guests (optional) A commas-separated list of valid email addresses to invite to the event.
timezone (optional) Set to current timezone from the device or browser by default. Alternatively, use the TZ database name values from this article
repeat_freq (optional) String value ['daily', 'weekly', 'monthly', or 'yearly']. Will override repeat_days.
repeat_days (optional) A space-separated list of days the event should repeat on. Can use values 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', or 'Sat' (e.g. 'Mon Tue' for repeating on Mondays and Tuesdays). Do not use simultaneously with repeat_freq.
repeat_end (optional) Specify either an integer for number of occurrences, or an end date for repeats in YYYY-MM-DD format. Applies to repeat_freq and repeat_days.

Default SurveyCTO feature support

Feature / Property Support
Supported field type(s) text
Default values No
Read only No
media:image No
media:audio No
media:video No
numbers appearance No
numbers-decimal appearance No
numbers-phone appearance No

More resources

About

Use this field plug-in to create Google Calendar events.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 53.8%
  • HTML 43.8%
  • CSS 2.4%