Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can I map specific parts of a Google Form to one spreadsheet, and other parts to another spreadsheet? Some of the responses on one will be public and viewable by anyone, but others will be private.

share|improve this question

You can run a script that will catch the submitted responses, then add a row to the public spreadsheet with the appropriate data. If you need any help writing this, let me know.


Something like this should do it:

 * This will 
 * set a trigger for this as described here: 
 * https://developers.google.com/apps-script/understanding_triggers#ActionTriggers
 * @param {Object} e The event parameter for form submission to a spreadsheet;
 *     see https://developers.google.com/apps-script/understanding_events

function onSubmit(e){
  properties = {publicSheetId:'PUT YOUR PUBLIC SHEET HERE',
                publicFields:['Question 1', 'Question 2?']};
  var form = FormApp.getActiveForm();
  var responses = form.getResponses();
  var lastResponse = responses[responses.length -1];
  var publicSheet = SpreadsheetApp.openById(properties.publicSheetId);
  //form = FormApp.getActiveForm();
  //e = FormApp.getActiveForm().getResponse()
  var itemResponses = lastResponse.getItemResponses()
  var publicItemResponses = []
  for (var i = 0; i < properties.publicFields.length; i++){
    var publicField = properties.publicFields[i]
    for (var j = 0; j < itemResponses.length; j++) {
      var itemResponse = itemResponses[j];
      if(itemResponse.getItem().getTitle() == publicField){
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.