hook_form_alter() on a view exposed filter form I am trying to add a disable attribute in a field using the hook_form_id_alter function.  I created a module and built the function

function disableIncentiveform_form_views_exposed_form_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  if ($form['#id'] == 'views-exposed-form-drive-clean-incentive-search-page-1'){
    $form['field_new_used']['#attributes']['disabled'] = 'disabled';
  }
}


However, this does not add an attribute to the form. 

I know there used to be a hook_form_views_exposed_form_alter function in D7 but I can't find anything specific for D8.  Is there a correct way to do this?
This code should do it:

function MYMODULE_form_views_exposed_form_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  $view_ids = ['YOUR_VIEW_ID'];
  $view = $form_state-&gt;getStorage('view');
  if ($form_id == 'views_exposed_form' &amp;&amp; in_array($view['view']-&gt;id(), $view_ids)) {
    $form['field_new_used']['#attributes']['disabled'] = 'disabled';
  }
}