Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to allow Drop Down listbox to accept null values/no value

Avatar

Level 1

How do you get a drop down list box to accept null as its value, without "Allowing Custom Text Entry" ?

In other words I want my list box to have values of:

Apple

Orange

Pear

Peach

Null

0 Replies

Avatar

Level 10

You can add an entry with a space in it or you can type the word null to represent no selection

Paul

Avatar

Level 2

You can have an entry in the list to represent no value ("<none>").

Then you can add an exit script that looks like:

if (this.rawValue === "<none>") {
    this.rawValue = null;
}

This way, when the user selects the "<none>" entry, the value will be set to null when they exit the field.

   John