4 Replies Latest reply on Sep 23, 2016 1:05 PM by try67

    Cannot get correct calculation dependant on radio button

    zubobinski Level 1

      Hi all


      Its a very long time since I cut any code and need some help with this question which hopefully will help me on other fields I am calculating.


      So I am using Acrobat X Pro, which I am new to as well, I have two radio buttons with same name auth but choices of Yes and No; the Yes radio button is the default value.


      I have a read only field which I wish to hold the value based on the simple logic if Yes is clicked then set a value of 350 otherwise set the value to 0


      I entered the following Javascript into the custom calculation script


      var field1 = this.getField("auth").value;

      if (field1="Yes"){event.value = "350";

      } else event.value = "0";


      When I test this the calculated field is ALWAYS 350 regardless of the selected radio button.....


      anyone tell me why??? or more importantly how to fix it.