How can I use Multiple Forms with two buttons to select between the two?

I would like to have two forms with buttons, when clicked, allows me to start the form and fill its slots. I am aware that the buttons in the responses section allows me to do so, but I can’t seem to get it working.

Does anyone have a working template/example that implements this requirement?

Thanks!

Hello,

Yes, you can use Google Apps Script to create custom forms with buttons that allow you to start the form and fill its slots. Here is an example template that you can use:

Create a Google Form and add all the required questions.

Open the Script Editor by clicking on “Tools” > “Script editor” in the Google Forms menu.

Paste the following code in the Script Editor:

css Copy code function doGet() { var template = HtmlService.createTemplateFromFile(‘Form’); var page = template.evaluate(); page.setTitle(‘Custom Form’); return page; }

function processForm(form) { var formResponse = form.createResponse(); var items = form.getItems();

for (var i = 0; i < items.length; i++) { var item = items[i]; var response = item.asTextItem().createResponse(‘Your answer’); formResponse.withItemResponse(response); }

formResponse.submit(); } Save the script and create a new HTML file by clicking on “File” > “New” > “Html file”. Name the file “Form”.

Paste the following HTML code in the new file:

php Copy code


Save the HTML file and return to the Script Editor.

Click on “Publish” > “Deploy as web app” and configure the web app settings as follows:

Project version: New Execute the app as: Me Who has access to the app: Anyone, even anonymous Click on “Deploy” and copy the URL of the web app.

Open the Google Form and click on “Responses” > “View responses”.

Click on the “Select response destination” button and choose “Create a new spreadsheet”.

Click on “Tools” > “Script editor” and replace the URL in the following line of code with the URL of the web app: Foremost Pay Online arduino Copy code var template = HtmlService.createTemplateFromFile(‘Form’); Save the script and reload the Google Form. You should now see two buttons on the form: “Start Form” and “Fill Slots”. Clicking on “Start Form” will open the custom form in a new window, and clicking on “Fill Slots” will submit the answers of the custom form to the original Google Form. You can customize the HTML code and the Google Apps Script to suit your specific requirements.