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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Scripting Help

Avatar

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.

1 Reply

Avatar

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";
}