1 Reply Latest reply: Apr 30, 2012 6:36 AM by GKaiseril RSS
Need coding help for returning values         Although this is a
sad testament to my programming skills, I have little shame
since I only do this kind of thing perhaps once every two or
three years. I’m using FormCalc (mainly b/c I’m still learning
Javascript and this form had already been written in FormCalc),
but my hope is that the similarity between the languages will
get me an answer in this forum.          Here is the problem:
I have three text fields (Textfield1, Textfield2, Textfield3).
I created three variables (var1, var2, var3) and initialized
them to 0.          In order to determine how many of the fields
contain data, I used if/then/else statements:          if
(Textfield1.rawValue == “”) then           var1 =0
Textfield2 and Textfield3 have similar statements (using
variables var2 and var3 respectively).          To test the
code, I have a message box returning the sum of var1 + var2 +
var3. With NOTHING