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.

Form number count

Avatar

Former Community Member
Hi, I am stuck with probably the most simple script i need for my Livecycle form. I want to have a number in the form with 6 characters which counts up starting from a certain number each time the form is saved.



Can someone help me out on this one?



Thx in advance, Tom
1 Reply

Avatar

Level 5
Here is what you may try....

add a textField add set the default value to 100000 (or the number you want) and in 'preSave' event add the following JS code



this.rawValue = parseInt(this.rawValue) +1



Good Luck,