InputfieldSelectMultiple::addOption()

Add options only if they are non-blank

We don't need blank options in a select multiple since the unselected state involves no selected options

Usage

// basic usage
$self = $inputfieldSelectMultiple->addOption($value);

// usage with all arguments
$self = $inputfieldSelectMultiple->addOption($value, $label = null, array $attributes = null);

Arguments

NameType(s)Description
$valuestring int
$label (optional)string null
$attributes (optional)array

Return value

self


InputfieldSelectMultiple methods and properties

API reference based on ProcessWire core version 3.0.251