March 2016
Beginner to intermediate
232 pages
4h 29m
English
To create a modal dialog, which prevents the user from updating anything in the spreadsheet or document, update the code in the Code.gs file as shown here:
function onOpen(){
DocumentApp.getUi()
.createAddonMenu()
.addItem("Show Dialog", "showDialog")
.addToUi();
}
function showDialog() {
var html = HtmlService
.createHtmlOutputFromFile('Index');
DocumentApp.getUi()
.showModalDialog(html, 'Greeting');
}Go to Add-ons | Chapter 2 | Show Dialog and a modal dialog will pop up:

Read now
Unlock full access