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

Dropdown item "other" prompts for text and then replaces the dropdown with that text

Explorer ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

I don't know if this is even possible or just a stupid idea. I have a field where a location needs to be entered. We have meetings via Zoom regularly, and at various physical sites. What I am thinking is having a dropdown with two selections: "Zoom" and "Other" and I always make the default item an empty space, using just a "space" character.

My idea is that when the user clicks on "Other", a dialog box or something pops up, allowing the user to enter details of the physical location. The dropdown then gets replaced with that text information in the same space and is scrollable/wrap able. The obvious problem is, scrollable is pointless in a printed hard copy. Entering custom text into the dropdown is problematic because of limited space in the field.

Is there a solution to this, or should I just leave it as a regular text field and let the user potentially type the same thing numerous times (as in the Zoom option)?

TOPICS
How to , JavaScript , PDF forms

Views

287

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

correct answers 1 Correct answer

Community Expert , Jul 15, 2022 Jul 15, 2022

You can place a (read-only) text field next to the drop-down and then fill it with the value the user enters into the alert window. Something like this should work (as the custom validation script of the drop-down):

 

if (event.value=="Other") this.getField("Other Text").value = app.response("Enter the other location:");

else this.getField("Other Text").value = "";

 

[Edited]

Votes

Translate

Translate
Community Expert ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

You can place a (read-only) text field next to the drop-down and then fill it with the value the user enters into the alert window. Something like this should work (as the custom validation script of the drop-down):

 

if (event.value=="Other") this.getField("Other Text").value = app.response("Enter the other location:");

else this.getField("Other Text").value = "";

 

[Edited]

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
Explorer ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

Thanks. That seems to work.

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
Explorer ,
Jul 16, 2022 Jul 16, 2022

Copy link to clipboard

Copied

LATEST
Is there a way to take this a step further, like I can in Access:

When other is selected for location and a value entered in the prompt, can
that value then be saved to the drop down as a future option in the list?
Can it be custom sorted?


Thanks.
--
Chaplain Derek Godfrey

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