I have a date/time field called SubmitDate. I'm trying to store the date/time into that field, just before saving the form. For some reason this JS is not working.
SubmitDate.rawValue = Date.getDate();
app.execMenuItem("SaveAs");
app.launchURL("http://Adobe.com");
Am I doing something wrong?
Solved! Go to Solution.
Views
Replies
Total Likes
Topics help categorize Community content and increase your ability to discover relevant content.
You haven't defined what Date is. I think you want o do somethig like this:
var nDate = new Date();
SubmitDate.rawValue = nDate.getDate();
After this code runs the value of the current day (an integer between 1-31) will be placed in the SubmitDate field. For today it woudl return 6.
Note that this is standard javascript and has nothing to do with the form. The only part that is unique to the form is the assignment statement to SubmitDate.
Paul
Views
Replies
Total Likes
You haven't defined what Date is. I think you want o do somethig like this:
var nDate = new Date();
SubmitDate.rawValue = nDate.getDate();
After this code runs the value of the current day (an integer between 1-31) will be placed in the SubmitDate field. For today it woudl return 6.
Note that this is standard javascript and has nothing to do with the form. The only part that is unique to the form is the assignment statement to SubmitDate.
Paul
Views
Replies
Total Likes
Thank you for this explanation -- that helps.
Since I have a Date/Time field (SubmitDate) in my form, how would I populate that with the current date and time?
Views
Replies
Total Likes
submitDate.rawValue = Date()
or you can use the Current Date and Time Object in teh Custom library palette. This using FormCalc to get the current Date but you end up with the same thing.
Paul
Views
Replies
Total Likes
Views
Likes
Replies