Skip to main content
Participant
October 5, 2018
Question

Adobe Form Field does not display the result of a calculation`

  • October 5, 2018
  • 1 reply
  • 261 views

Hello,

I have a calculate script for a TextField.  The form runs without error, but the TextField remains blank.

I'm sure you need more information from me to answer this questions, but I am not sure what information I should provide.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
October 5, 2018

Can you post the actual code?

Participant
October 5, 2018

The code in the TextField is:

var n = 0;

var Total = 0;

for (var i=1; i<7; i++)

{

  for (var h=1; h<6; h++)

  {

      if (this.getField("CheckBox"+i+"["+h+"]").value !== "Off")

      {

        n++;

        Total+=this.getField("CheckBox"+i+"["+h+"]").value;

      }

  }

}

this.rawValue = Total / n;

The checkboxes are named Checkbox1[1]..Checkbox1[5] through Checkbox6[1]...Checkbox6[5] and are in Group1 through Group 6

try67
Community Expert
Community Expert
October 5, 2018

Is this an LCD form or an Acrobat form?

If the latter change this.rawValue to event.value in the last line.