Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Date field not locking date on Save

Avatar

Former Community Member
On a form that we use to create quotes for customers, we have a date field that inserts the current date when the user clicks the field.



Syntax:



----- form1.#subform[0].CurrentDate::click - (FormCalc, client) ------------------------------------



// Current Date in short-style date format.



$.rawValue = num2date(date(), DateFmt(3))



The date is not being saved with the rest of the data on the form upon saving, and is coming up blank when the file is accessed later.



Is there a better way to import the current date, and if not, what am I doing wrong?



Thanks,



Tyler
3 Replies

Avatar

Former Community Member
What binding do you have set on the date field?



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
Binding is currently "None" - I guess that would do it, wouldn't it...



Changed to Normal. Thanks!

Avatar

Former Community Member
Hi,

Newbie here with a similar issue:



I have request forms which are sorted by date submitted. I am collecting the data via email submit and when i open the data in the form, i still get current date, not date submitted.



Tried all of the above, and what I've found in other forums with little success.



What is the process to stop the date script from running or transforming the date script in a plain text field? I've little experience with Java (obviously) and not much more with OOP.



I do not have a database to file these forms to if that helps.

Any input w