java script
Copy link to clipboard
Copied
Hi,
i have problem applying javascript for a fillable document. does anyone know a javascript for applying the current date and time.
So when i open the document, it will automatically show the current date and time.
Thank you.
Copy link to clipboard
Copied
Let's say you have a text field called Today. Go to Tools - JavaScript - Document JavaScripts and create a new item (let's call it MyScripts), with this code:
this.getField("Today").value = util.printd("mm/dd/yyyy HH:MM", new Date());
Click OK and save the file. From that moment on that field will contain the current time and date each time you open the file.
You can adjust the format of the date pattern string in the code to your liking, of course.
Copy link to clipboard
Copied
Thank you for your help kindly,
is it possible to do this on a javascript in acrobat x:
1) For time estimation, is it possible to designate mins, hours and the totals. so when i type in the time field. it will show the total time in hh/mm, when the current time commence.
2) For % can we make this a % field, so if we type in "90" it will show "90%"
Thank you!
Copy link to clipboard
Copied
I don't understand how these questions relate to your original question... Please clarify what you mean.

