1

I'm trying to create my own Gmail Add-on with Google Apps Script, and looking at some of their samples (for learning). I can't determine how to use/edit an event, e['forminput']; and I've been unable to find specific documentation that answers this question.

The full program is on GitHub, called "Expense It!", and the event I'm looking at is line 113 in card.js:

var res = e['formInput'];

The closest I have found to event documentation thus far is this page: https://developers.google.com/apps-script/guides/triggers/events

function submitForm(e) {
  var res = e['formInput'];

I would like to be able to edit/create my own form, but don't know what I can and can't do with this event, or how to print what's in the object it produces.

Line49
  • 11
  • 2
  • I recommend reading the [Card-based interfaces section of the Add-on reference documentation](https://developers.google.com/gsuite/add-ons/concepts/card-interfaces). – TheAddonDepot Aug 07 '19 at 23:07

1 Answers1

1

The documentation is titled "Add-on actions". See lines 59-62 to see that the function is attached to CardService.newAction.

The documentation you linked to is for events for simple and installable triggers, not add-on actions.

Did you complete the codelab associated with the code you linked to? That should show you how to create your own form.

dwmorrin
  • 2,704
  • 8
  • 17