Expand my Community achievements bar.

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

Hide dropdown object's button except when there is focus on field?

Avatar

Level 9

Is there a way to hide the dropdown object's button (only) when there is not focus on that dropdown field? So the button would not be visable until the user clicks into that dropdown and is not visible when the user exits that dropdown field. Like the way the date object works.

1 Accepted Solution

Avatar

Correct answer by
Level 10

If you set the field's access to readOnly by default, they still can enter the field to show the button if you put the script above in the enter's event...

I hope I'm understanding you well, this method should be working perfectly if your goal is to hide the button within the dropdown list

View solution in original post

5 Replies

Avatar

Level 10

Hi there,

Yes there is a way, when you set the dropdown's field access to readOnly, the button disappear...

So if you set the field's access to open when the user enters the field, the button will appear

And if you set the field's access to readOnly when the user exit the field, the button will disappear

Hope this will help ya!

Avatar

Level 9

So - I would need to leave the buttons visible until after the user makes a selecetion and exits. Correct? The buttons can't be hidden before they enter because then they would not be able to enter the field.

Avatar

Level 9

And once a selection is made and exited, the user would not be able to change their selection?

Avatar

Correct answer by
Level 10

If you set the field's access to readOnly by default, they still can enter the field to show the button if you put the script above in the enter's event...

I hope I'm understanding you well, this method should be working perfectly if your goal is to hide the button within the dropdown list

Avatar

Level 9

Sorry - I missed that part. Thanks so much!