Google Scripts: Concatenating Form Responses

Viewed 330

I'm completely new to the google scripting language. I've been following a tutorial (http://www.jessespevack.com/blog/2016/2/9/turn-a-google-form-response-into-a-calendar-event) trying to convert a leave form response to a calendar event. I'm trying to find a way to concatenate a number of fields into a single attribute, but I haven't been able to find a way to achieve this.

The tutorial includes this section:

  //a mapping of form item titles to sections of the 
  //calendar event
  formMap : {
    eventTitle : "",
    startTime : "",
    endTime: "",
    description: "",
    location: "",
    email: "",
  },

After each attribute ("eventTitle", "startTime" etc) it requires me to list a field name from my form ("First Name", "Last Name") etc between the quotes. Using one field in each works just fine, but I need to concatenate two fields into some attributes (such as "First Name" + "Last Name"), but all traditional methods I know of don't work.

Combining questions (ie a single name field) isn't an option as there's more data I need to collect.

Any help would be greatly appreciated!

Many thanks!

1 Answers
Related