I'm trying to save multiple values from multi select option form which I created in the custom widget with:
$element['labs'] = array( '#type' => 'select', '#options' => $list, '#multiple' => 'multiple', '#title' => t('Labs'), );
The biggest problem is the values won't save! As I know the delta should increment automatically if cardinality is set to more than 1.
1) I can't change cardinality or some other setting after activating the field in the edit field form
2) I can't see my custom field in the field type list to select from if I try to alter existing widgets:
'default_widget' => 'options_select', 'default_formatter' => 'status_field_options',
How could I extend standard list field type to populate the multiselect with my own generated data?
How could I write my widget that Drupal let me save multiple values with different delta?