5 Replies Latest reply on Dec 7, 2016 12:54 PM by gkaiseril

    mulitple check boxes controling one text box. script trouble


      I asked a question yesterday about a single check box activating the border of a text box.  That question was answered perfectly and now I want to expand on that with 3 boxes.  sorry if a new post is not proper etiquette I'm new here, and the last one was marked answered.


      the question I asked previously:  need to activate line with of a textbox with a checkbox.


      Basically I have three checkboxes and if any of them are checked then I want the box to show the border.  I'm still trying to type the code in the properties -> actions area since the "All javascript" part adds XML that I'm not exactly sure what its used for so I don't want to change it or create something without it...   Basically I'm typing the below code into the actions of each checkbox which seems redundant but I don't know any other way to do it.  The console is great when trying things out but what do I do when I want to send this PDF to someone?  other than actions where does the code go?


      so, anyway, here is the code I'm trying.  ( I DID change the value in each check box from "Yes" to "3")


      var cb1 = getField("CheckBox1").value;

      var cb2 = getField("CheckBox2").value;

      var cb3 = getField("CheckBox3").value;

      var bord = getField("bordr1");



      if (cb1 ^ cb2 ^ cb3 == "3") {

          bord.lineWidth = 3;

          bord.display = display.visible;


      else {

          bord.display = display.hidden;



      this works to a point.  I can check each box individually and get the border.  I can check the "first and third", and the "second and third" but when I check the "first and second" the border turns back off when the second box is checked.  I'm confused as to why this is happening,  Any thoughts?