Change default Taxonomy value on form via form alter in D7 I am trying to alter a form with a taxonomy term select drop down field; I want to change the default term selected when the form loads.  I'm altering the form array via hook_form_alter; however, my changes do not seem to be taking effect.  I'm looking for an answer similar to this but for Drupal 7.

I'm expecting :

        $form['field_mytax_reference']['#default_value'] = array($taxTermId =&gt; $taxTermName);


to do the job but the form remains with the default specified when the field was created. 

Thanks in advance.
It'll be something more along the lines of:

$form['field_mytax_reference'][LANGUAGE_NONE][0]['#default_value'] = $taxTermId;


If the field is a multi-select you would wrap the default value in an array, but there's no need to set a key for it:

$form['field_mytax_reference'][LANGUAGE_NONE][0]['#default_value'] = array($taxTermId);


Have a look at Why is hook_form_alter() so messy? for a bit more info.