Fun with dropdown menu titles

As we were recently fixing a few issues with the Dropdown Menu control, we started thinking more seriously about the behavior of that control in Form Builder and Form Runner, and it turned out to be interesting!
The questions revolve around the special item at the top of the list, which we call the dropdown title. It is present to encourage the user to make a selection. With Orbeon Forms 4.4 and earlier, we simply had a rather imperative “[Select…]” title.
So what title should we show, and when? There are different possibilities. For example:
  • When the control value is optional, we could show a different title, because in that case we shouldn’t tell the user too imperatively to enter data.
  • We could leave a blank title in both required and optional cases.
For now we have decided to show a message in both cases, as a little bit of additional hinting shouldn’t hurt. And to be polite, we say “please”:


Encourage the user a bit
Encourage the user a bit

Here is how the dropdowns look when you open them:


Required value
Required value
Optional value
Optional value

Now when a value is required and a choice is selected, you can argue that there is no point showing “Please select:” to the user anymore, as the user shouldn’t go back to a point where no value is selected. Here we could:
  • entirely remove the title
  • show a blank title
What if you have selected a choice by mistake, and you want to go back to an empty choice to remember to make a selection at a later time? This argues in favor of leaving a blank title. But if an initial choice is provided, either by default or by loading values from a service, you probably shouldn’t be able to get to a situation where no choice is selected!
So it’s subtle and there might not be a “one size fits all” solution. For now, we have elected to blank the title when a value is selected even in the required case:


Blank title for required value
Blank title for required value

Of course, when the selection is optional, then it makes sense to have a blank title to deselect the choice.


Allow deselection
Allow deselection

In addition, we have now internationalized the title, something we had apparently overlooked for a long time (of course, Form Builder has allowed you to internationalize choices since the beginning).


Localization
Localization

We noticed that in review and PDF modes, we showed the good old “[Select…]” title in the absence of a selection, which was not very useful! It is better to show an empty field, which also allows users who print forms on paper to fill in a value:


Filled optional value in review
Filled optional value in review
Empty optional value in review
Empty optional value in review

Finally, instead of being hardcoded this is now entirely implemented in a simple XBL component which is quite easy to adapt.
These improvements will be available in Orbeon Forms 4.5.