Expand my Community achievements bar.

SOLVED

Help if else stmt with drop-down

Avatar

Level 2

I am trying to populate a text field after a selection has been made in a dropdown field.  Can anyone provide a script example or an area I could go to find some help on this item?

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 6

Please find the attached updated file.

you can find lot of help/tutorials online in adobe site.

Also please go through the help of the Adobe LiveCycle Designer first.

Then google for "Acrobat JavaScript Scripting Reference" and "Adobe® XML Form Object Model Reference".

RAGHU.

View solution in original post

6 Replies

Avatar

Level 6

Please check the attached sample.

if(xfa.event.newText != null){ // get the drop down value on change event
TextField1.rawValue = "You Selected " +xfa.event.newText; // here passing the selected value to text field to populate

here code on change event of the drop down list. u can place any even which is suitable for ur requirement.

Hope this will help.

RAGHU.

Avatar

Level 2

Thank you for your help.  I am afraid I am very new at this and may need a little more explanation.  Attached is a screen shot of where I expected to see the formula.  Am I looking in the wrong place?  I guess I was hoping to see your formula and then see if I could figure out how to edit it.

Thanks so much!

Avatar

Level 6

U want to populate the text field when selected something on drop down list. So formula have to write on drop down list, not on the text field where u need pre population.

Also select "Events with scrpt" value from script window tab dropdown list on the top, so that u can see the code.


Right now ur looking at Calculate event of the drop down list - This event dosen't have any code. Please see the attached screen shot.

RAGHU.

Avatar

Level 2

I apologize for being such a newbie...and completley appreciate your help.

I changed the drop down list to what I am trying to get at:

If Market Group Airports is selected then I want Market Group Leader to display Scott

If Development then Jack

If Environmental and Transportation then Paul

Also do you know of any good resources to find information for someone starting with forms?

Thanks so much!

Avatar

Correct answer by
Level 6

Please find the attached updated file.

you can find lot of help/tutorials online in adobe site.

Also please go through the help of the Adobe LiveCycle Designer first.

Then google for "Acrobat JavaScript Scripting Reference" and "Adobe® XML Form Object Model Reference".

RAGHU.

Avatar

Level 2

Thank you so much ...it is working!