Theodoros:
I'm trying to figure out how to stop the field from changing too.
I found the following formcalc code on the AUC forums
http://www.acrobatusers.com/forums/aucbb/viewtopic.php?pid=43197if ($.rawValue==null)then
$.rawValue = time()
else $.rawValue
endif
and modified it for my javascript:
if (this.rawValue == null) {
var d = new Date();
//divide result by 1000 to get seconds and round off
this.rawValue = parseInt(d / 1000);
}
else {
this.rawValue = rawValue;
}
I tried saving the form with the generated number and it didn't regenerate on opening. It probably needs to be more robust than this for general use but it works enough for my testing purposes.