Node form alter query While editing a node I've printed the dsm($form) in hook_form_alter and in the dsm array I see the following values:

....
form_id (Array, 3 elements)

    #type (String, 6 characters ) hidden
    #value (String, 14 characters ) unit_node_form
    #id (String, 19 characters ) edit-unit-node-form

.....


This node's machine name is "unit" I want to know what is the difference between #value and #id values.

I want to catch form alter of only this node while editing it.
Typically you would use a check on $form_id to make sure your hook_form_alter would only apply the specific form. A node editing form is normally only present on edit pages, so it would only apply to edit pages as the form is not displayed anywhere else.

Don't forget that hook_form_alter is called on all forms, so you need to check for the some values to not apply it to all forms. Usually this is the form_id.

To check for a specific form you would use:

/**
* Implementation of HOOK_form_alter()
*/
function MYMODULE_form_alter(&amp;$form, $form_state, $form_id) {

  // 1.UNIT CONTENT TYPE FORM
  if ($form_id == 'unit_node_form') {

  }

}


This can be helpful if you modify multiple forms in one module.
If you prefer not to do that you should maybe use hook_form_FORM_ID_alter() to modify only a specific form.

Checking the form api $form_id is defined as:


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


The question this throws up now is:

Is $form_id defined from 

$form['form_id']['#value'] 


or from 

$form['#form_id']


Both of which give the same results. 
So unfortunately I can not directly give you an answer, other than that the form will only display on edit pages, so using $form_id seems to be standard proceedure.