Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Scripting Help

medic48
Level 1
Level 1

I created a form in Adobe Live Cycle and need helping on scripting.  I have a field as Drop Down list as Sample one, Sample two, Sample three , Sample four, and Sample five in that field.  I would like to have another field with 1, 2, 3, 4, and 5. Every time a user selects Sample One in the first field, the second field would auto-fill a numeric of 1.  If the user selects, Sample Two in the first field, the second field would automatically enter as 2, and so on. 

Is it possible to create a scripting for this? Some type of form calculation? 

Any help is appreciated.

0 Replies
Varma_LC
Level 6
Level 6

//check the following JavaScript in change event of DD1.....

// form1.#subform[0].DD1::change - (JavaScript, client)

if (xfa.event.newText == "Sample 1") {
DD2.rawValue = "1";
}
if (xfa.event.newText == "Sample 2") {
DD2.rawValue = "2";
}
if (xfa.event.newText == "Sample 3") {
DD2.rawValue = "3";
}