Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Advice : JavaScript question

Avatar

Level 1

Beginner advice :

1. script by default today's date how to express

2. default input convert lowercase to uppercase

thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

to populate todays date use FormCalc in the docReady event.

if ($.isNull) then

     $ = Num2Date(Date(), "DD/MM/YYYY")

else

     $.rawValue

endif

To change lowercase to uppercase use JavaScript in the change event of your field.

xfa.event.change = xfa.event.change.toUpperCase();

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

to populate todays date use FormCalc in the docReady event.

if ($.isNull) then

     $ = Num2Date(Date(), "DD/MM/YYYY")

else

     $.rawValue

endif

To change lowercase to uppercase use JavaScript in the change event of your field.

xfa.event.change = xfa.event.change.toUpperCase();