I have been searching in vain for days trying to find the right hook or theme override to basically change a few fields I have defined in a custom registration form.
The default markup generated by Drupal is too verbose and the designer has requested that I not change the CSS -- I need to bend the markup to meet the CSS not the CSS to play nice with Drupal.
I have tried hook_field_widget_form_alter and have managed to wrap the existing markup in div's but I need to remove the default:
function tweakform_field_widget_form_alter(&$element, &$form_state, $context) {
//$element['#prefix'] = '<dir style="background-color: red">';
//$element['#suffix'] = '</div>';
}
Can someone please show me how this is done? I don't want to re-write the entire form.tpl.php as I only need to override a few fields markup -- then again it may be handy to override the whole thing. These fields are dynamic and controlled by designer and more may be added later or possibly removed.
Alex