Why isn't my custom form element theme function being called?
OK, so you need several things combined in order for this to work:


#theme =&gt; unique_name_for_theme_function on the form element.
In your template.php mytemplate_theme() function you need to return an array something like: array( 'unique_name_for_theme_function' =&gt; array('function') =&gt; 'myfunc') );. This was the bit I was missing.
Then in your template.php you need to add a myfunc. I found it easiest to just google "Drupal theme_form_element", "Drupal theme_checkboxes" or whatever, and then copy paste the code I found in to a mytemplate_theme_checkboxes function which I then modified to suit my needs.
Then you need to flush cache for Drupal to find your theme function.