Hi following Tanaike's answer here, I was able to successfully implement a form into a pop-up window in my google sheet, however when another user (that I've set as editor attempt to open this pop up I get this error message:
"You do not have access to perform that action. Please ask the owner of this item to grant access to you."
It is not clear how I can grant further access to this second user as he's already set as editor.
Here is the script I trigger:
function launchForm() {
var formTitle = '';
var formID = '14uZANF9q3FKQvfLD1Qx-enYdeQ_pxzORTeHwSSKtHOk';
var form = FormApp.openById(formID);
var formUrl = form.getPublishedUrl();
var htmlApp = HtmlService
.createHtmlOutput('<script>location.href = "' + formUrl + '"</script>')
.setSandboxMode(HtmlService.SandboxMode.IFRAME)
.setTitle(formTitle)
.setWidth(900)
.setHeight(750);
SpreadsheetApp.getActiveSpreadsheet().show(htmlApp);
}
function onOpen() {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var entries = [{
name : "Launch Form",
functionName : "launchForm"
}];
sheet.addMenu("Custom Menu", entries);
};