Date field populates depending on when form opens



Hi - I have a form to be submitted that includes a list of subjects for a particular meeting that happens each Monday. Can a date field populate with the date of that Monday when the form opens in the preceeding week? And then happen each week after that?


Accepted Solutions (1)

Accepted Solutions (1)



Are you generating a new form each week?

If so, this will get the date for next Monday - you can play with the format:

var d = new Date();

d.setDate(d.getDate() + (1 + 7 - d.getDay()) % 7);

this.rawValue = d;

If you are using the same form for multiple weeks, then you would need to test to see if the current field value was less that the value generated by the script and replace in the field if needed.

Good Luck,

Answers (0)