I have a Google sheet -"A". A google form- "B" and google form response sheet- "C". There is a date mentioned in "A". Form "B" asks for many responses, out of which date is one of them.
Logic:- Before submitting the form "B", I want to make sure that the date entered by user is greater than the date already mentioned in "A".
If logic is true submit form. Else display- form can not be submitted.
I can extract date from sheet "A". But I am not able to push or read or validate date entry done in form "B".
I am writing the script in Google forms.
function datevalidate() {
var Sheet= SpreadsheetApp.openById("avbchfhlhasf").getSheetByName("Booking");
var Origdate= Sheet.getRange(2, 9).getValues()[0];
var form = FormApp.openById("jhkjdshfkjasdfk");
var item= form.getItems(FormApp.ItemType.DATE);
Logger.log(item[0]);
}
i expect the date of "B"- in code "item " to be validated with date of "A" in code "Origdate"- BEFORE submitting the form.