By johannesf on
Hi
I try to use the "hook_form_FORM_ID_alter" in my theme called "sds". It seems not to fire?
I Register the hook.
function sds_theme() {
return array (
'form_news_node_form_alter' => array(
'arguments' => array('form' => NULL),
)
);
}
And the a test (form id is news_node_form, a cck field).
function sds_form_news_node_form_alter(&$form, &$form_state) {
print_r($form);
}
Nothing happends, please som advise?
regards // Johannes
Comments
You should use that hook in a
You should use that hook in a module, not in a theme.
Live long ... and prosper!
You can use hook_form_alters
You can use hook_form_alters in Drupal 7 themes, but I think in D6 you are stuck writing a simple module. Once you have your module folder and info file created create your .module file and add this