Copy link to clipboard
Copied
I have 48 fields (name of the fields: format1, format2 ... etc) with a drop down menu.
Options include: store1, store2, store3, store4, store5, store6, store7, store8, store9.
I want a numeric field to ONLY calculate the 1-9 options
Copy link to clipboard
Copied
You need to provide more information than that. This is a very vague description... Also, what exactly is your question?
Copy link to clipboard
Copied
i´m new in Javascript,
I created a fillable form using Acrobat.
In my document I have 48 drop down menus. (the name of each one dropdown menu is: format1, format2, format3, ... etc)
all the dropdown menu have 9 options inside ( store1, store2, store3, store4, store5, store6,store7, store8, store9)
I would like to count the number of times 'store1' was selected in a drop down list in multiple fields.
I need a script to do this.
I have more than 2 weeks trying, but I have not been able to do it
Copy link to clipboard
Copied
Use this code as the custom calculation script of the text field where you want to display the result:
var total = 0;
for (var i=1; i<=48; i++) {
if (this.getField("format"+i).valueAsString=="store1") total++;
}
event.value = total;
Copy link to clipboard
Copied
Thank you, I really appreciate your help. You're a great master!!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now