I have a form that upon clicking the EmailSubmit button, I would like a text box to populate with the current date, or what I am calling the "EffectiveDate". I would like it to populate with just the date, no time. I am using Livecycle ES 8. I found Javascript code to do this, however, it does not work in Livecycle, only in Acrobat (this.getField). Can someone advise of the Javascript code that would work with Livecycle?
I found the following code, which works, but I only want the date; this gives the day and time along with the date.
Code: topmostSubform.Page1.EffectiveDate.rawValue = Date();
Result: Tue Sep 27 2011 09:53:19 GMT-0700 (US Mountain Standard Time)
Lastly, I also have code written to this EmailSubmit button which locks all the fillable fields before sending. I am not having any problems with this code.
Thanks,
MJ
EffectiveDate.rawValue = util.printd("mm/dd/yyyy",new Date());
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script