How do I add an AJAX action on a select element in a ContentEntityForm to change the value of another select element
SOLUTION: Got this working with the following. You have to set the #ajax property on the widget

// Set the ajax function to run on the change of filing category.
$form['category']['widget']['#ajax'] = [
  'callback' =&gt; '_ajax_form_category_change',
  'event' =&gt; 'change',
  'wrapper' =&gt; 'ajax_id_data_type',
  'method' =&gt; 'replace',
];