By jorditr on
Hi you all.
I've been searching and searching on the forums trying to find how to determine that the hook_alter_form acts according the node type. One example would be limiting that the menu or path or nodewords alter the editing form with their parameters on each and every node type. I thought it would be easy adding at the very beginning of the function something like:
if ($node->type == 'required_node_type) {
return;
}which would be skip the hook funtion if the node matches such requirement, but after two days of trying and trying I haven't got any result...
Any idea?
Comments
example code
for an example application, see http://drupal.org/node/87595
Wow, DriesK, thanks a lot
Wow, DriesK, thanks a lot for your fast answer :-)
I observed similar things on some modules but didn't find the proper parameter. Thanks again.
Dries I can't get this to
Dries
I can't get this to work. Here is the code for my module:
It's not displaying my added fields to the rbtpa_course node type.
Also, how do I validate this to make sure the required checkboxes are ticked?
Thanks
Glenn
Glenn
THECA Group