hook_field_widget_form_alter - modify specified field only
So it's actually to be found in $context['items']

if (($context['items']-&gt;getName() != 'field_myfield')) {
  return;
}

// if still here, our field matches. do something


Also note you can be more efficient by using the WIDGET_TYPE hook, e.g. for my "Check boxes/radio buttons" widget:

function hook_field_widget_options_buttons_form_alter(...)