How do I rewrite the ID of an exposed filter field element?
EDIT:

I'm leaving the code below but just for kicks I went into my dev theme and did a hook_form_alter() to test another way of achieving what you want to do. What you are when you do the dpm() isn't the full output of what can possibly be changed in the HTML. You can do the following to change the ID.

&lt;?php
function THEMENAME_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  dpm($form); // Print out before change.
  // The 'created' was my form element, yours would be which checkbox you wanted to change.
  $form['created']['#id'] = drupal_html_id('my-new-id');
  dpm($form); // Print out after change.
}
?&gt;


The images below show the changes in the ID and the dpm() output. They are for a select box but it should work the same for any form element.

Before Change:


After Change:


The HTML Change:


Original Thought:

I think you have to use hook_theme_form_element() for this.

&lt;?php
function &lt;theme_name&gt;_form_element($variables) {
  $element = $variables['element'];
  // Do something with checkbox
  if ($element['#type'] == 'checkbox' {
    // do something with element array like $variables['element']['#id'] = 'new value'
  }
  return theme_form_element($variables);
}
?&gt;


The code above isn't tied to a certain form ID so you may have to do a little more processing to get to that piece but it should be a good starting point. Don't forget to make the ID's unique as they are originally.

Checkout the API docs for more information.

Or you can try preprocessing the form element as well, I have done this with other elements but not sure if I changed the ID's.

&lt;?php
function MYTHEME_preprocess_form_element(&amp;$vars) {
  $vars['attributes']['id'][] = 'another-id ';
}
?&gt;