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

Select dropdown option, show a textfield, empty textfield shows dropdown options again

New Here ,
Dec 22, 2022 Dec 22, 2022

Copy link to clipboard

Copied

Hi

 

I'm pretty new to Adobe Forms /  Javascript so go easy on me! 

 

I have a drop down called "Shipping Type" with 3 options - Pallets, Loose, Other. 

On selection of Other I would like a textbox (called "ST-Other") to show where the Dropdown was with default text - Please Specify Requirments 

If you backspace all text from the textbox I want the Dropdown options to show again. 

 

Is this possible? 

 

Along with the javascript, please let me know if i need to enable any Actions as well? On mouse focus? blur? etc? 

 

Thankyou! 🙂

TOPICS
PDF forms

Views

235

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 ,
Dec 22, 2022 Dec 22, 2022

Copy link to clipboard

Copied

I would not recommend you do that. It can be quite confusing for the user. You should create the text field next to the drop-down and show/hide it as needed.

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 ,
Dec 22, 2022 Dec 22, 2022

Copy link to clipboard

Copied

LATEST

Use this as 'validation' script of dropdown field:

if(event.value == "Other"){
event.target.display = display.hidden;
this.getField("ST-Other").display = display.visible;
this.getField("ST-Other").value = "Please Specify Requirments";}

 

Use this as 'Validation' script of text field:

if(event.value == ""){
event.target.display = display.hidden;
this.getField("Shipping Type").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