I am creating a form though apps script. I am not sure how to put the form into a specific folder.
I am sure that it is easy, I am just missing something.
//Creation of Pay Form
const formfolder = DriveApp.getFileById('1XtKv79svMkMGGz-g0dr6p5JwqryEJxeU')
var custnamecell = theSheet.getRange("E1");
var custname = custnamecell.getValue();
var adrescell = theSheet.getRange("B3");
var adres = adrescell.getValue();
var title = (custname);
var discription = (adres);
var form = FormApp.create(title)
.setDescription(discription);
>Solution :
You can use the following code to create a Google Form and save it to a specific folder:
const formFolder = DriveApp.getFolderById('FOLDER_ID');
const form = FormApp.create('Form Name');
const formFile = DriveApp.getFileById(form.getId());
formFolder.addFile(formFile);
DriveApp.getRootFolder().removeFile(formFile);
Replace FOLDER_ID with the ID of the folder where you want to save the form.