Open avernet opened 1 week ago
That's a tough one. I'm not finding a way to have the dropdown show "Please select:" when closed, and when opened have the first choice be empty instead of "Please select...".
I have a prototype where "Please select:" is shown above the dropdown when the value is empty, but getting this to display properly across browsers and operating systems seems finicky.
Idea: Rely on <option hidden selected>Please select:</option>
being shown in the dropdown when closed, but not when open. When no value is selected, the first item is <option hidden selected>Please select:</option>
. However, when a value is selected, we change it to <option/>
.
To implement this, we need to support xxf:hidden="{...}"
on <xf:item>
. This support should be added in the content handler, Ajax response, and XFormsUI.
Idea: Rely on
<option hidden selected>Please select:</option>
being shown in the dropdown when closed, but not when open.
Bummer: that works with Chrome, but not with Safari. Back to the drawing board.
The two options that are both consistent and certain possible to implement without "hacks" with native dropdowns are to:
For the current behavior, and argument for making this change watch the following video.
https://github.com/orbeon/orbeon-forms/assets/106961/61f8d4c3-5ec6-4e4d-b528-4268b811770b
+1 from customer