Copy link to clipboard
Copied
I'm trying to get an Acrobat form text field to display one of three answers depending on which checkbox above it was selected. Any help much appreciated.
Copy link to clipboard
Copied
"Choice1" is the value, so use this:
if (this.getField("Criteria 1").valueAsString == "Choice1")
Copy link to clipboard
Copied
Sorry, I'm new to this. They are radio buttons. They are all under Criteria 1 and set as Radio Button Choice 1, 2 and 3.
I'm using the code below but don't know how to write correctly name Criteria 1 choice 1 to call the getField.
"var text = "Static text goes here";
if(this.getField("Criteria 1.Choice1").valueAsString != "Off")
text += "button 1 text";
if(this.getField("Criteria 1.Choice2").valueAsString!= "Off")
text += "button 2 text";
if(this.getField("Criteria 1 .hoice3").valueAsString!= "Off")
text += "button 3 text";
event.value = text;
Copy link to clipboard
Copied
"Choice1" is the value, so use this:
if (this.getField("Criteria 1").valueAsString == "Choice1")
Copy link to clipboard
Copied
Thanks try67. That worked perfectly. Much appreciated. Kerry
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more