Does anyone have an example of how I add an Entity Select (Specifically a term reference) to a custom composite?
Here's the code I've tired. The field with the title shows up but no select.
$elements['test_tax'] = [
'#type' => 'entity_select',
'#title' => t('Test Taxonomy'),
'#target_type' => 'taxonomy_term',
'#selection_handler' => 'default:taxonomy_term',
'#selection_settings' => [
'target_bundles' => [
'my_terms' => 'my_terms'
],
'sort' => [
'field' => 'name',
'direction' => 'ASC'
]
]
];
I'm a front-end guy so I'm a bit out of my element in php...