Can someone help me figure out how to auto-fill the dates on a form so that someone would only need to enter in one date, and have the rest automatically generate based on that information?
Like if I put in Monday's date, and I wanted to have Tuesday's, Wednesday's, Thursday's, and Friday's dates automatically fill themselves in, how would I do that in Acrobat 9?
Thanks in advance for any help.
Now, to calculate the next day after Date1, use this code as the custom calculation:
showFutureDate(1);
Change the value of the parameter to change the number of days in the future to show.
function showFutureDate(numDays) {
d1 = getField("Date1").value;
if (d1=="") {
event.value = "";
} else {
var d2 = util.scand("mm/dd/yyyy", d1);
d2.setTime(d2.getTime()+(numDays*86400000));
event.value = util.printd("mm/dd/yyyy", d2);
}
}
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com