I dont know if this is uncharted terrotory an error i have spotted or im just have got it totally wrong?
If you go use a general theme overwrite for the theme_radios function (phptemplate_radios() or THEMENAME_radios())
It all work nice. But if I have a specific form where theres a need to change the html output of the radio & radios it becomes a little strange:
look at the vote form:
i create a overwrite in my template.php
function THEME_poll_view_voting($form){
$content = '';
$form['choice']['#theme'] = "radios_poll";
$cnt = count($form['choice']['#options']);
for ($i=0; $i < $cnt ; $i++) {
$form['choice'][$i]['#theme']= "radio_poll";
}
$content .= drupal_render($form);
return $content;
offcourse I got the 2 custom theme functions:
function theme_radio_poll($element){
//....
}
function theme_radios_poll($element){
//....
}
if i dont call a specielt function for the $form['choice'] then the return type is "radios"
But when its run through my custom function ( $form['choice']['#theme'] = "radios_poll";) i get "markup" from the function. why?
If I copy the exact function from theme_radios i still get a different output. than from the "theme_radios()"
It look like it dosnt get the $element['#children'] send to the theme_radios_poll()
so eem does anybody have a good idea?
/morten.dk