options
Sets or gets the picker's options.
Description
Setting the options
property sets all the options available to a mobile app user.
Getting the options
property returns the current list of options available to a mobile app user.
You cannot modify the data array in-place. To add, change, or remove individual mobile picker options:
- Store the value of the
options
property in a variable. - Make changes to the options array.
- Reset the
options
property with the modified array.
Type:
NAME
TYPE
DESCRIPTION
The value of the mobile picker option. This is what you use in code and is what is stored in your collections. Mandatory if label
is not specified.
The label of the mobile picker option. This is what a mobile app user sees. Mandatory if value
is not specified.
The description of the mobile picker option. This is what a mobile app user sees.
Whether the mobile picker option is selected.
Whether the mobile picker option is enabled.
Was this helpful?
1let myPickerOptions = $w('#mobilePicker1').options; // [{ value: 'L', label: 'Large', description: 'Adult Large', selected: false, enabled: true }, { value: 'XL', label: 'Extra Large', description: 'Adult Extra Large', selected: false, enabled: true }]
1$w('#mobilePicker1').options = [2 { value: 'S', label: 'Small', description: 'Adult Small', selected: false, enabled: true },3 { value: 'M', label: 'Medium', description: 'Adult Medium', selected: false, enabled: true },4 { value: 'L', label: 'Large', description: 'Adult Large', selected: false, enabled: true },5 { value: 'XL', label: 'Extra Large', description: 'Adult Extra Large', selected: false, enabled: true }6];