Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Turn off read only when radio button is selected?

$
0
0

I have two radio buttons to hide/show the second page in an Acrobat Form. All fields on the second page are marked read only. The second page is hidden by a text box with the background and border turned white. The No button is auto-selected so that that the second page appears blank. When the Yes button is selected, the text box hiding the second page goes away. I need the fields on the second page to be fillable when the Yes button is selected. The second page has about 124 fields that need to have read only turned off when the Yes button is selected. I am not sure if I have missed something in my script or not and I'm kind of cross-eyed at this point. Here is part of the script. I took a bunch out because it's so long. Is there a length limit to how much should be on one action or am I making a mistake on how I've written this?

 

//on Mouse Up run javascript

 

if(this.getField(event.target.name).value == "Yes"){

 

    this.getField("pg2.Unit #").readOnly = false;

    this.getField("pg2.MFG").readOnly = false;

    this.getField("pg2.Model").readOnly = false;

   

    this.getField("pg2.Serial").readOnly = false;

    this.getField("pg2.Voltage").readOnly = false;

    this.getField("pg2.Phase").readOnly = false;

   

    this.getField("pg2.Cycle").readOnly = false;

    this.getField("pg2.Text5").readOnly = false;

    this.getField("pg2.Text6").readOnly = false;

   

    this.getField("pg2.Text7").readOnly = false;

    this.getField("pg2.Text8").readOnly = false;

    this.getField("pg2.Text9").readOnly = false;

 

    this.getField("pg2.Part4").readOnly = false;

    this.getField("pg2.Description4").readOnly = false;

    this.getField("pg2.Vendor4").readOnly = false;

 

    this.getField("pg2.Part7").readOnly = false;

    this.getField("pg2.Description7").readOnly = false;

    this.getField("pg2.Vendor7").readOnly = false;

   

    this.getField("pg2.M Volt2").readOnly = false;

    this.getField("pg2.M Phase2").readOnly = false;

    this.getField("pg2.M Amps2").readOnly = false;

   

    this.getField("pg2.Additional RemarksRow1").readOnly = false;

    this.getField("pg2.Dropdown2").readOnly = false;

}


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>