8 Replies Latest reply on Apr 20, 2012 1:43 PM by creditunion123

    Having issues with checkbox

    creditunion123 Level 1

      Hi all.  I am fairly new to javascript and I am hoping someone can assist in what I am trying to do.  I need to do this right now using Javascript - not Livecycle.  Have not learned Livecycle yet plus the software version I am using does not support dynamic forms created by Livecycle


      I am trying to have a check box show based on whether another field is blank or not


      I have tried using two different scripts but with no luck.  Am I missing a step


      I have gone into said checkbox. 

      Check style is check

      Export Value is yes - but there is no value in my script

      I have tried having the check the box stating checked by default in the properties.  I have also tried having it not ticked.



      This is the code I am using in the actual field (not checkbox as that only allows action on mouse actions an the staff may not click anywhere in there if the form prefills for them




      var CPartner3 = this.getField("FormValues.accountNames_3").value

      var cb = this.getField("Checkbox34").value

      cb.defaultIsChecked(0, false);


      if (cPartner3 !="")


        cb.defaultIsChecked(0, true);





      I have also tried having if (cParther3 !="")


        cb.presence = visible




      cb.presence = hidden



      // end


      Neither work


      The other code that places the word Partner works fine


      Any thoughts??