4

I like to generate the Google Form using my own template engine. Unfortunatelly in the basic theme you can change only the background image, fonts, color etc is allowed. I like to have a nice HTML page in "bootstrap" style. So far I can see I could do this using Google Script. The script should open the form and generate HTML template (like example below).

Does someone know how to generate correctly this form? Which url to submit should I use? Hidden parameters?

Thanks for any comments.

Code.gs

function doGet() {
  return HtmlService
      .createTemplateFromFile('index')
      .evaluate();
};

function getData() {
  var form = FormApp.openById('....................');
  return form;
}

index.html

<? var data = getData(); ?>
<? var items = data.getItems(); ?>

<form action="https://docs.google.com/forms/d/..................../formResponse" method="POST">
<!-- .................... stands for form id //-->
<ul>
  <? for (var i = 0; i < items.length; i++) { ?>
    <li><?= items[i].getTitle(); ?></li>
  <? } ?>
</ul>
<input type="submit"/>
</form>

1 Answer 1

1

You can use this Google Form HTML Exporter tool http://stefano.brilli.me/google-forms-html-exporter/ all you have to provide is link to the Google Form.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.