The answer to this one is easily divined from the code to system_settings_form(): $form['#theme'] = 'system_settings_form'; And therein lines the problem; system settings form has its own theme. You'll need to override that after the call. Juraj Chlebec wrote:
Hi,
For example i have code looks like this:
<?php ...
/** * hook_theme() */ function themedemo_theme() { return array( 'themedemo_example' => array( 'arguments' => array('form' => NULL) ) ); }
/** * my admin settings form */ function themedemo_example() { $form = array();
$form['example'] = array( '#title' => t('This is just an example'), '#type' => 'checkbox', '#default_value' => FALSE );
return system_settings_form($form); }
/** * The function that has to be registered in hook_theme() */ function theme_themedemo_example($form) { $form['example']['#description'] = t('This description was added by the registered theme function.');
$output = drupal_render($form); return $output; } ?>
I think this is legal Drupal form. But in this case my theme function do not work. If i remove return system_settings_form($form); and return $form; only theming function work perfect. Where is problem?
Thanks for advance.
Havran