Is it possible to email a form

2019-08-26 07:02发布

问题:

I want to email a form to customers to fill out in the browser or ideally in rheir email client . I have created a form opened it by id , then sent it using

function openDialog() {

  // Open a form by ID.
  var form = FormApp.openById('kdhgsdfskfhs');


  var url = form.getPublishedUrl();
  var response = UrlFetchApp.fetch(url);
  var htmlBody = HtmlService.createHtmlOutput(response).getContent();
  MailApp.sendEmail({
    to: 'me@gmail.com',
    subject: 'hi',
    htmlBody: htmlBody
  });

}

You can see the result which I have put in screenshot . I'm starting to think that this is not doable in apps script. Is it possible ? if not what is the best way to send allow a user to enter info into a spreadsheet?

回答1:

It's possible email html. But I think your going to need a website or a webapp or a link to the online form to submit it to a spreadsheet.