I am fetching contents from Spreadsheet and adding it as items in form through Google Apps script. When I have a text in multiple lines (texts with new line breaks) in a cell, upon generating the form, it appears in a single line. I need to have it as exactly as I am giving in the sheet. Is there any way to achieve this using Apps script?
Here is the code I used to copy data from Sheet to crate item in form:
var ss = SpreadsheetApp.openByUrl(mySheetURL);
var sheet = ss.getSheets()[0];
var cellRange = 'C2:C6'
var ques = sheet.getRange(cellRange).getValues();
var newForm = FormApp.openByUrl(myformURL);
var QOD = newForm.addMultipleChoiceItem();
QOD.setTitle(ques);
Content in my Spreadsheet Cell:
Content in form: