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

Checkbox inside a text field

New Here ,
Mar 02, 2024 Mar 02, 2024

Copy link to clipboard

Copied

I am using a combo box that displays a text field on a selection.  I need text as well as a checkbox to appear.  When I put a checkbox in there, it remains when the text field disappears.  How can I make the checkbox appear/disappear with text in a text field???

TOPICS
PDF forms

Views

156

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 ,
Mar 02, 2024 Mar 02, 2024

Copy link to clipboard

Copied

You have text field and checkbox field, and you want both to show/hide depending on selection from dropdown field?

What is selection in a dropdown field, and what are the names of the text field and checkbox field?

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
New Here ,
Mar 03, 2024 Mar 03, 2024

Copy link to clipboard

Copied

Hi,

That is exactly what I need. There are 4 different selections:
leadership, leadership assistant, advisor, advisor assistant. There's one
huge text field. Textfield1. Three checkbooks. Box1, box2, box3

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
Community Expert ,
Mar 03, 2024 Mar 03, 2024

Copy link to clipboard

Copied

LATEST

What selection should show/hide fields?

Do you want to show/hide Textfield1 and all 3 checkboxes?

JavaScript is case sensitive so when you write Box1 and box2 for field names it's not the same.

The same for dropdown choices, if you write 'leadership' and your actual choice is 'Leadership' the script wouldn't work.

Here is an example script by using 'leadership' selection to show all fields and hide them when 'leadership' is not selected (put script in dropdown field under 'Validate' tab):

if(event.value == "leadership") {
 this.getField("Textfield1").display = display.visible;
 this.getField("Box1").display = display.visible;
 this.getField("Box2").display = display.visible;
 this.getField("Box3").display = display.visible;}
else {
 this.getField("Textfield1").display = display.hidden;
 this.getField("Box1").display = display.hidden;
 this.getField("Box2").display = display.hidden;
 this.getField("Box3").display = display.hidden;}

 

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