Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

drop down menu calculate

New Here ,
Jun 05, 2017 Jun 05, 2017

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

TOPICS
Acrobat SDK and JavaScript
272
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2017 Jun 06, 2017

You need to provide more information than that. This is a very vague description... Also, what exactly is your question?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 06, 2017 Jun 06, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2017 Jun 06, 2017

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;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 06, 2017 Jun 06, 2017
LATEST

Thank you, I really appreciate your help. You're a great master!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines