Skip to main content

Posts

Showing posts with the label survey

Creating a Restricted Multiple Choice Form With Apps Script

I was contacted and asked if I could create a Google Form where the user can only check 8 out of 16 checkbox choices. Google Forms can't do this sort of restriction and so I whipped together a quick web application to do this. I created an Apps Script in Google Drive and then added this code below. function doGet(e) { var app = UiApp.createApplication().setTitle("Restricted Multiple Choice").setHeight(250).setWidth(500) // Define the grid layout var grid = app.createGrid(16, 3 ).setStyleAttribute(3, 2, "width", "420px").setCellPadding(5) grid.setStyleAttribute("margin-left", "auto") grid.setStyleAttribute("margin-right", "auto") grid.setStyleAttribute("margin-top", "100px") // Create the text at the top var html = '' html += "Restricted Multiple Choice" html += "You can only choose 3 of the items below." var html_widget = app.createHT...