Skip to main content
Participant
May 25, 2023
Question

Help with IF statement and radio buttons

  • May 25, 2023
  • 1 reply
  • 374 views

I'm pretty new to Acrobat. I have a fillable PDF and a group of radio buttons (yes/no). If yes is selected, I want a line of text to be added to a text box. I know that this should be done doing a custom calculation in the textbox....I just don't know how to code it with a radio button grouping.

 

Any help? Thanks

This topic has been closed for replies.

1 reply

Sonny AR
Inspiring
May 25, 2023

Try this script:

if (this.getField("yesRadio").value === "Yes") {
    this.getField("resultText").value = "Your text Here.";
} else {
    this.getField("resultText").value = "";
}