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

If statement

LoriD
Registered: Jun 24 2008
Posts: 8
Answered

I am trying to create a pre-populated field using an IF statement. Unfortunately something isn't registering correctly because it does not seem to want to work.

I am using a drop down list to auto-fill the next line. I have set the values to the items in the drop down list. Here is the beginning of my statement using JavaScript:

if (this.rawValue = 1) then
InsCo="American"
endif

My goal is when a specific code is selected (1), then the next line should read American.

Any ideas?

Thanks.

My Product Information:
LiveCycle Designer, Windows
Lindy
Registered: Jul 17 2007
Posts: 30
Assuming your code is in the Change Event of the drop-down, and the 1 displays in the drop-down box, try:

if (xfa.event.newText == 1) {
InsCo.rawValue ="American";
}

Good Luck!