These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Add 1 to a field on docReady

drizagon
Registered: Oct 22 2009
Posts: 41
Answered

Hello,

Can anyone tell me how to add 1 to a field when a form is loaded? I have a field that I have set the default value to 0, but each time the form is loaded, I want to add 1 to that field, increasing the number by 1 each time the form is opened.

Thanks in advance for any insight!

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Use FormCalc in the docReady:event.

$ = $ + 1
To get it work you have to save the form everytime you close it.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

drizagon
Registered: Oct 22 2009
Posts: 41
Thanks for the reply radzmar, it worked out great.

For anyone trying this that wants to use Javascript instead of FormCalc, you can use:
this.rawValue =+ 1;
in the docReady as well.