Problem with autofill date field.
Hi,
I am trying to create an autofill date field on an Acrobat form that does not change once calculated, ie. the user opens the form and the date populates automatically, the user saves the form but on subsequent opening, the original date remains.
So far I have successfully created a Javascript in Page Properties Actions to print the date on opening the form but I cannot find a way of prevent further changes. I have tried various scripts to do this but none worked for me.
I also tried creating a field level calculation which worked fine in so much that it populated the field with the date as required but I couldn't clear the form before saving it for use. I found a debugging script to enable me to clear the field - great - but after saving and trying to use the form, the field remained blank. So I'm back to square one. I don't really mind if the field completes on opening the form or on a mouse click, as long as the date does not change if the form is reopened on another day.
if((typeof DEBUG !='undefined')&&(DEBUG==true))
{event.value="";}
else if(event.target.value=="")
{event.value=util.printd("dd/mm/yy",new Date());}
DEBUG=true;
this.calculateNow();
