n00b question, form callback and form_alter My highly-n00b question is: suppose I have a form callback which could be used as argument to drupal_get_form().  

How can I specify an ID for the form so I can compare it inside hook_form_alter against the given-as-argument $form_id?

This means: I want to give a form id to the form, e.g. "my-system-form", and distinguish it to apply some alter-logic (don't want to apply that logic to the rest of the forms).
hook_form_alter() has $form_id as an argument:

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


Which is:


  String representing the name of the form itself. Typically this is the name of the function that generated the form.


(emphasis mine)

To understand the "typically" in there, have a read through the docs for hook_forms() (chances are it won't apply to your situation, or if it does, you probably already know about it).

So, generally speaking, you can use:

function MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'MYMODULE_some_form') {
    ...
  }
}


Or, the more specific hook_form_FORM_ID_alter(), which will only be invoked for that specific form:

function MYMODULE_form_MYMODULE_some_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  ...
}