title: Javascript PDF form Radio Button Show/Hide
body: <p>I searched and couldn't find any results pertaining to javascript / PDF form applications so I apologize if there are actual results out there that I may have missed.</p>
  
  <p>I have 5 radio buttons, all sycronized for if one is turned on, rest are turned off. I'm trying to enable, based on which is selected, for which form (Cells) to show on a pdf.</p>
  
  <p>This is currently where I stand. The radio button for this script is set to mouse-up, and when turned on Text2 shows, but when a separate radio button is selected Text2 still shows. Only when I re-selected the first radio button does the Text2 disappear.</p>
  
  <p>I'm looking to show only particular cells based on what radio button is selected, and the rest are hidden.</p>
  
  <p>If someone could help lead me to a small example and I could apply from there. Thank you</p>
  
  <pre><code>if (this.getField("Text2").display == display.hidden)
  {
  this.getField("Text2").display = display.visible;
  }
  else
  {
      this.getField("Text2").display = display.hidden;
  }
  </code></pre>
  
  <p>edit: grammar
  update: This is what i'm necessarily trying to accomplish</p>
  
  <pre><code>if (this.SELECTED("Choice4")){
  this.getField("Text4").display = display.visible}
  else{
  this.getField("Text4").display = display.hiddenl}
  </code></pre>
  
  <p>update2: does not work either</p>
  
  <pre><code>if(document.getElementByI("Choice3").checked){
  this.getField("Text4").display = display.visible}
  else{
  this.getField("Text4").display = display.hidden}
  </code></pre>