Skip to main content
Participant
June 6, 2017
Question

drop down menu calculate

  • June 6, 2017
  • 1 reply
  • 315 views

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

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
June 6, 2017

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

CholeculaAuthor
Participant
June 6, 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

try67
Community Expert
Community Expert
June 6, 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;