Prompt in a combo box

Prompt in a combo box


is it possible to have a prompt (like it happens with the Input widget) in the combo box with a text WITHOUT using the special value list? In this way it would avoid to be part of the possible values of the combo box list. 


I just had a look at the OS Tutorial I'd gone through for creating a ToDo app.  In the screen ToDoDetail you can enter a new ToDo.  This screen has a few dropdowns.  When the Special List, Value 1, is set to 0... and Option 1 has text... that text does show as a Watermark.

This field is mandatory and when the Form gets validated, I believe OS has special processing for this option value.

Even if the field is not mandatory, that special processing still gets done... and the Special List options are not used as real selections.

This is what the option value 0 looks like when rendered.  Note the "__ossli_0".  I believe this is what OS uses to ensure that value does not get submitted.

<option value="__ossli_0">Please enter a User Name</option>

they are used as real selections... with Value 1 as 0 and Option 1 with a text. That's why I am asking for a way TO AVOID this special list (it counts as value for the combo box).... and figuring out a way to put a prompt like the Input widget.

So odd... I'm just not seeing that.  I'm using the Dublin Theme... maybe that's the difference.

I have a dropdown for a Title field with Special List Value 1 set to 0 and Option 1 set to Please select a value.  If I do not select a value, fill in other fields, and then save... no value is saved in that Title Field.

Anything to do with the property "Special Variable"?

Just to check... is this Web or Mobile?

Hi Jorge,

If you bind a Special Variable too, the behavior will be like this:  if you selected one option from regular list, variable will be this value. If you selected anyone from special list, the variable will assume NullIdentifier and Special Variable will be set with the special list value.

So you can combine both variable and special variable to get the prompt as you like.

Best regards




Hello Jorge,

First, no it is not possible to have a "prompt" in a Combo Box.
You HAVE to use the special list.

But if the user selects the item in the special list, its value is NEVER associated with the variable, no matter if the special variable is defined or not.

What happens is that if you select a value of the Special List, the application, at the next submit/ajax submit, will set the value of the special variable bounded (if it exists) to the selected value, and will set the value of the variable bounded (if it exists) to the default value, like NullIdentifier() in the case the variable is an Entity Identifier.

If, on the other hand, the user selects the value of the list, its value will be set in the variable, and if there is a special variable associated, the default value for the type of the values in the special list will be set (like 0).

So, as you can see, there is no problems.

You can use the special item to add a "prompt" to the combo box without worrying about it going to the variable.

As you can see here:
The value in the Special List item is 1, but it never goes to the variable. Every time you select it, the variable goes to NullIdentifier (and I didn't set a special variable, because it is not needed).

Eduardo Jauch


Adding to the posts above, and assuming you are using client-side validations, the value 0 on the special list will be considered to be empty - and the form will become invalid when the user tries to submit it.