I have a date field that populates the current date when the user pulls up the form, which is what I want. However, when the user saves the form and sends it to someone a few days later, whoever pulls up the form gets the current date, instead of the date the user saved it. (We need the date the form was initially filled out.) I am using Acrobat Professional 6.0.6
// variable to store whether document has been opened already or not
var bAlreadyOpened;
function docOpened()
{
if(bAlreadyOpened != "true")
{
// document has just been opened
var d = new Date();
var sDate = util.printd("mm/dd/yyyy", d);
this.getField("todaysDate").value = sDate;
// now set bAlreadyOpened to true so it doesn't
// run again
bAlreadyOpened = "true";
}
else
{
// document has already been opened
}
}
// call the docOpened() function
docOpened();
My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.