yes, i get that - but if i wanted to do it for all dates before the 28th, I could create a separate template to manually input if the first date is the 29th, 30th, or 31st. It would still make things easier if i had 2 schedules where at least one of them I could have the dates input as i stated and then the other manual as I am currently doing. Can you show me a way to do what I am looking for up to the 28th?
OK. In that case, assuming the fields are named NextMonth1-NextMonth36, you can use this code as the custom Validation script of the original date field:
if (event.value) {
var d = util.scand("mm/dd/yyyy", event.value);
if (d.getDate()<=28) {
// data is before (or equal to) the 28th -> populate the other fields
for (var i=1; i<=36; i++) {
d.setMonth(d.getMonth()+1);
this.getField("NextMonth"+i).value = util.printd("mm/dd/yyyy", d);
}
} else {
// date is after the 28th -> clear the other fields
for (var i=1; i<=36; i++) {
this.getField("NextMonth"+i).value = "";
}
}
} else {
// field is empty -> clear the other fields
for (var i=1; i<=36; i++) {
this.getField("NextMonth"+i).value = "";
}
}