2

I need to add line breaks inside a (grid type) question in a Google Form. Many forums note that this is not possible because Google Forms questions are plain text.

Is there a way to use Google Apps Script to insert a new question type that allows for formatting the text of the question itself?

Related questions led me here Create Custom Forms w/GUI Builder and here Custom Google Forms but GUI Builder and the capability to host Custom Forms on Drive both appear to have been discontinued.

What is the next best solution now that these are no longer available? (If it's necessary & still possible to make a custom form from a Google Spreadsheet, can anyone point me towards a tutorial that's newer than December 2014, the time Google discontinued many of the services linked to in older tutorials)

smf
  • 21
  • 3
  • You can use Google's HTML Service to serve a html page. You can create any kind of html constructs in there, including formatting text, tables, buttons, etc. This page has an example: https://developers.google.com/apps-script/guides/html/?hl=en Does this help? Another example to create a form and call a server side function on submit (the errors have been ironed out): http://stackoverflow.com/questions/11910003/submitting-a-form-in-htmlservice-on-google-app-scripts – Sujay Phadke Jan 14 '16 at 00:30
  • Thank you @electronicsguy, this is definitely helpful. The part I'm still struggling with is the step where the HTML constructs connect to the existing Form. (or the script that writes the new form). In your 2nd example, where does that code between
    go? In an html file in an Apps Script project? And if so, what goes in the Code.gs file?
    – smf Jan 14 '16 at 16:37
  • For instance, this tutorial writes a UI and links to a spreadsheet [link](http://customizegoogledocs.blogspot.com/2014/05/ui-services-in-google-apps-script.html), using deprecated functions- I need newer materials that start with the equivalent of that first step (e.g., writing the code.gs file) – smf Jan 14 '16 at 16:38
  • Please see the 1st example. They show you how you have server side code (in code.gs) which creates a html output (whose specifics you put within the 'html' file) on the client side. Now referring to the second link, the '
    ' part will go into the html file. It'll call a function from the code.gs file (using 'google.script.run.xyz()'). you can see an example here: https://developers.google.com/apps-script/guides/html/communication. The code.gs contains functions which use Google APIs to do tasks. You can put code there to write to a spreadsheet.
    – Sujay Phadke Jan 15 '16 at 00:58

0 Answers0