Remove or hide the submit button on search block in Drupal 7 I need to do some custom theming on the search block in Drupal 7.

Specifically, I need to add a class to the submit button that makes it invisible and removes it from the content flow.  So:

&lt;div class="form-actions form-wrapper" id="edit-actions"&gt;
  &lt;input type="submit" id="edit-submit" name="op" value="Search" class="form-submit"&gt;
&lt;/div&gt;


Becomes...

&lt;div class="form-actions form-wrapper element-invisible" id="edit-actions"&gt;
  &lt;input type="submit" id="edit-submit" name="op" value="Search" class="form-submit"&gt;
&lt;/div&gt;


I added element-invisible to the edit-actions div element.  However, I can't figure out how to do this.  What's the best practice for doing this sort of thing?
One of the standard ways to do this would be to use hook_form_alter() and add the attributes to the actions element directly:

function MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'search_block_form') {
    $form['actions']['#attributes']['class'][] = 'element-invisible';
  }
}