How do I auto populate a date field when a document gets digitally signed using LiveCycle ES2? I have a form that has multiple signature fields and date fields. I want to have the date field populate when a person signs that document. That date will need to stay the same when the next person signs it. For example, person A signs the document on 20 Jun and sends it to person B. That person signs it on 22 Jun. I want the dates to stay the same when a new person opens the form to sign it. Thanks.
This can be achieved by adding a 'postSign' Event Java script on the signature Field.
In the java script, you can get the current System time and then populate the Date Field object.
Hope this helps.
I would recommend using Varun's script below but for US users change the date format to "mm.dd.yyyy" or whichever you prefer. Also if you want certain fields to be locked after your user signs the form I suggest using a PreSign event instead of a PostSign. Create and Modify a collections list with the particular fields to lock and apply it in your "Object-signature" tab. This will populate the date code and then lock it preventing a change. Below is the same is Varun's script but applied to my form.
topmostSubform.Page2.PMDate.rawValue = util.printd("mm.dd.yyyy", new Date())