I have created a spreadsheet to which I display Google Forms from it using the sandbox, iframe mode. However, the google forms do not respond to clicks, when clicking on the embedded iframe. It seems to be something related to CORS because if I enable my CORS suppresser plugin it becomes clickable. However, I don't want to have to install a CORS plugin on every computer I install the feature. How do I solve this problem to everyone accessing the spreadsheet?
function panel(){
var form = FormApp.openById('formId');
var formUrl = form.getPublishedUrl();
var response = UrlFetchApp.fetch(formUrl);
var formHtml = response.getContentText();
var htmlApp = HtmlService
.createHtmlOutput(formHtml)
.setSandboxMode(HtmlService.SandboxMode.IFRAME)
.setTitle('Form')
.setWidth(600)
.setHeight(800);
SpreadsheetApp.getActiveSpreadsheet().show(htmlApp);
}
Whenever I click next I receive back the following messages on my console on Google Chrome Browser.
Access to XMLHttpRequest at 'https://www.gstatic.com//freebird//js/k=freebird.v.en.lcU4npEiYUw.O/rt=j/d=0/rs=AMjVe6hdoeb-_UmrKEHSn6K-MdbidWgqhw/m=syu,syv,syt,syw,syx,syy,syz,syj,sy10,sy1q,sy2n,sy31,KFVhZe' from origin 'https://n-tnjo46dbraljse3yd32xl22ypwhdx36fhlaiora-0lu-script.googleusercontent.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.