how to alter only one set of specific forms? Consider I have 3 content type. The problem is that if I use form alter in a module , when I use:

drupal_set_message(t($form_id), 'status', FALSE);


in the mentioned hook, it shows me different set of form-IDs as message on showing each node add/edit form.

For example if I go to node type A add/edit form, drupal_set_message shows:

A_node_form


if I go to node type B add/edit form, drupal_set_message shows:

A_node_form
B_node_form


if I go to node type C add/edit form, drupal_set_message shows:

A_node_form
B_node_form
C_node_form


Showing them means that I can not really make an specific effect for each content type add/edit form by form_alter.

Note: I use OG module and B and C are the content types and A is the group type.

How should I solve it?
In the case you need, so you can easily use control flow in your hook_form_alter

You know that the hook runs everytime a form is willing to be rendered, so you can easily do something like

hook_form_alter(&amp;$form, &amp;$form_state, $form_id){

if($form_id == 'A_node_form'){...}//alter form A

if($form_id == 'B_node_form'){...}//alter form B

if($form_id == 'C_node_form'){...}//alter form C

}