SelectFromList() can also be used to display a list of items with checkboxes, where the user can then select multiple items rather than a single item.
There are two requirements in order to use
Framework.SelectFromList({
title: "Which do you want?",
checkboxes: true,
items: [
{id: "item1", caption: "Item 1"},
{id: "item2", caption: "Item 2", checked: true}, // Checked by default
{id: "item3", caption: "Item3", someExtraPrivateData: "x2"}
]
}, function (selection) {
// Either null, or an array of the checked items
});
The return value from
By default, the dialog's Save button is/remains enabled even if no items are checked (and the return value is then an empty array). If you want to prevent this, and to force the user either to cancel the dialog or to select at least one item, then you can specify