Getting all the values out of a field as array of values I have a multi-select field in my work section



I want to get the values either with the Element api as json or an array of simple values in my template.
$element-&gt;getFieldValue('handle') or it's Twig equivalent element.handle contains an Object of type MultiOptionsFieldData you can get all possible values via itsgetOptions()` function

Twig

{{ dump(entry.fieldHandle.getOptions()) }}


PHP

$options = $element-&gt;getFieldValue('handle')-&gt;getOptions();