Skip navigation
Currently Being Moderated

Check box to change charge rates.

Aug 4, 2011 12:59 PM

Basically I am trying to implement javascript or formcalc to perform the following function...


When you check the highcost_Yes check box the value in field charge1 changes to 10, with no check in the highcost_Yes field the value of charge1 should be 8.

I have the default value for the charge1 field set to 8 as well if that may be causing me issues.


check box highcost_Yes (values set to 1 or 0)



This is the javascript snippit I tried:


if (highcost_Yes ==1)


charge1 == 10


charge1 == 8



After some reaserch I tried this formcalc code:


if(highcost_Yes == 1)then

elseif (charge1==8)


I have been learning javascript this term in school so while I understand the concept I am far from practicing it efficiently.

Can anyone tell me where I went wrong?  Thanks!

  • Currently Being Moderated
    Aug 5, 2011 6:57 AM   in reply to CoreyScheck

    Hi Corey;


    If I read your post correctly, highcost_Yes is the name of the radio button field.  A radio button (and any field) is an object, so you need to look at its properties and not the field itself:


    if (highcost_Yes.rawValue ==1)




    rawValue will contain the current state of the field.




    You may also try posting in the LiveCycle Designer or LiveCycle Forms forums.  There are a lot more JavaScript and FormCalc people on that list.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points