It's actually a bit compicated to change the enum values of enum. I would recommend using the ezselection datatype which is a new, simplified and faster implementation of this datatype.
In terms of performance ezselection is also highly recommended.
Sounds good, but I still don't know how to change the value.
I suppose it is
$selection->setContent()
but what kind of parameter do I have to use? Array? I want to select e.g. the second entry.
Thanks, Sebastian
In the ezselection datatype we just store the id's of the selections in the data_text field as a string. If you have multiple values you need to use a - character as a space. E.g. "1-3" where the id's 1 and 3 are selected.
This can done with the setAttribute( 'data_text', '1-3' );