0 Replies Latest reply on Jun 11, 2013 10:34 AM by goslinc

    If statements to make fields visible or hidden

    goslinc

      Based on how the user answers a question being asked in "this.rawValue" field, I want other fields to become visible.  I have this code and it worked until I added the last reference.  If the users answers "Rating" I need three fields to become visible otherwise hidden and I don't know how to state it properly.

       

      if(this.rawValue=="RefExempt")

      NPV.presence="visible"

      else

      NPV.presence="hidden"

       

      if(this.rawValue=="DExempt")

      Discount.presence="visible"

      else

      Discount.presence="hidden"

       

      if(this.rawValue=="Rating")

      Rated.presence="visible"

      NotRated.presence="visible"

      InvestCert.presence="visible"

      else

      Rated.presence="hidden"

      NotRated.presence="hidden"

      InvestCert.presence="hidden";