Hi I am developing a module that creates a new asset formatter, widgit and type. The asset item is an extension of fileItem. I have added the following
$element[‘default_asset_type’] = [
‘#type’ => ‘select’,
‘#title’ => t(‘Default asset type’),
‘#options’ => [
‘tone of voice’, ‘font’, ‘svg’
‘#weight’ => 12,
to the fieldSettingsForm() function which i am extending from the parent FileItem. Now when i go to attache the asset to a content type i see an extra select button and that’s what i want, but when i go to save it, i get an error: An illegal choice has been detected. Please contact the site administrator.
Does anyone know why this is? Any pointers are appreciated.