Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

date stamp

Avatar

Former Community Member

I have set up a date field on my form so that the date shows up automatically. Currently if i open the document today and save it, it has todays date.  Tomorrow if I open the form again, it has the previous day's date. I would like the date to always be current-showing the date the file was opened. Can anyone explain how to do this?

I am using the following script in the ready:layout event

this.rawValue

= xfa.timeStamp

5 Replies

Avatar

Level 10

Try like this..

if(this.rawValue != null)

     this.rawValue = xfa.timeStamp;

Thanks

Srini

Avatar

Former Community Member

thank you for your help. i put the script in the layout:ready event but the date does not show up automatically when i open the pdf file. is there a way to make it automatically bring up the current date when the form opens without having to choose a date on the calendar?

Avatar

Former Community Member

There is an object in the Custom Libraray called Current Date that will do this for you. Simply drag it onto the form where you want your date and you are good to go.

Paul

Avatar

Former Community Member

i tried that but the date is not showing. its just a blank box.