Trying to manipulate a form that can be a select / radios or text field based on the user configuration...
If the user wants to use radios for the form... then my module will render the using standard drupal render system.
However when I use theme('radios',$variables['element']) it doesn't work at all... the output is:
<div id="some-id" class="form-radios"></div>
However if I use: drupal_render_children($variables) it works perfectly...
Any clues on why theme('radios') behave differently as the rest of the form API items?
This is the code I'm using:
$form['radio_test'] = array(
'#type' => 'radios',
'#title' => 'test',
'#options' => array( 'a', 'b', 'c' ),
);
dpm(theme('radios',$form['radio_test']));
And this is the output
<div class="form-radios"></div>
theme('radios')
for a form element you right defined.theme()
ordrupal_render()
. When the form is rendered from Drupal,drupal_render()
will be called.