Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

? Drop down box 'Other' want to be able to enter text

Avatar

Level 2

I have a drop down box created, working fine with one of the options being 'Other:'.

When the user clicks on 'Other:' I want them to be able to enter text at that point.

  How do u do that??? 

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

There are at least two approaches.

You could tick the Allow custom text entry in the Object > Field palette:

Custom dropdown list.png

This would allow a user to overtype directly into the dropdown. Their input does not become an item on the list.

Another approach would be to have script in the exit event of the dropdown which would show a textfield if the user selected Other from the list. For example if the text field was called otherDescription, then this in the exit event of the dropdown should work:

if (this.rawValue === "Other") {

     otherDescription.presence = "visible";

}

else {

     otherDescription.presence = "hidden";

}

Hope that helps,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

There are at least two approaches.

You could tick the Allow custom text entry in the Object > Field palette:

Custom dropdown list.png

This would allow a user to overtype directly into the dropdown. Their input does not become an item on the list.

Another approach would be to have script in the exit event of the dropdown which would show a textfield if the user selected Other from the list. For example if the text field was called otherDescription, then this in the exit event of the dropdown should work:

if (this.rawValue === "Other") {

     otherDescription.presence = "visible";

}

else {

     otherDescription.presence = "hidden";

}

Hope that helps,

Niall

Avatar

Level 7

Easy--in the Object Pallet, Field Tab, check the box that says "Allow Custom Text Entry"

I hope this helps,

Stephen