• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Show/hide radio buttons from

Community Beginner ,
Oct 16, 2022 Oct 16, 2022

Copy link to clipboard

Copied

Hello,

I am looking for help on pdf forms for making a radio buttons and text boxes show from a selection drop down list.

Thank you!!

TOPICS
PDF forms , Standards and accessibility

Views

285

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

LATEST

Hi,

This can be done by using the validate function of the drop down list. but first make sure the "commit selected value immediately" is checked in the drop down properties.

BarlaeDC_0-1666104321925.png

 

Then you can add validation,

(for this validation my radio buttons are "Group8", and my text fields are name "TextField.1", "TextField.2", etc.....)

[ please note the dot in the text field]

 

This enables me to use this code on the validation event of the drop down list

// hide radio button group
this.getField("Group8").display = display.hidden;
// hide all text fields
this.getField("TextField").display = display.hidden;
if (event.value == "showAll") {
  // show radio button group
  this.getField("Group8").display = display.visible;
  // show all text fields
  this.getField("TextField").display = display.visible;
} else if ( event.value == "showText"){
  // just show the text fields
  this.getField("TextField").display = display.visible;
} else if ( event.value == "showRadio"){
  // just show the radio buttons
  this.getField("Group8").display = display.visible;
} else if ( event.value == "showTextOne"){
  // just show one text field.
  this.getField("TextField.1").display = display.visible;
}

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines