Pupulating the date field up on opening the document
Hello,
Have a 6 page doc. some pages have date field but with different field's names. On first page I want to check if the date is null then populate it with current date, then copy the populated date to other pages... if the document was save and reopened latter I want the first populated date to be kept as it was populated the first time.
First date field "TodaysDate" is Open for update date fields on other pages are readonly.
First page date field named as: TodaysDate.
and following code is run upon opening of doc. under Tool/JavaScript/Document JavaScripts:
function populate_date(doc)
{
var f = this.getField("TodaysDate");
if (!f.value) f.value = util.printd ("m/d/yyyy", new Date());
}
populate_date(this); // call my function
Problem I have it does not get populated at all.. and this is the screen capture I get via Consul:

any idea what could be wrong?
Regards,
Jeff P.
