Alter html output of a term reference form field
Doing it that way round will cause problems with the form submission; the value for a term reference field needs to be an integer and throwing a string at it will undoubtedly upset things. You could massage values back into place in a validate function but it seems a bit...messy.

The alternative would be to load the taxonomy term up in the form, so you can use the ID from there:

$terms = taxonomy_get_term_by_name('External', 'vocab_machine_name');
$term = array_shift($terms);
$form['field_organisaton']['#states'] = array(
  'visible' =&gt; array(
    ':input[name="field_trainingstype[und]"]' =&gt; array('value' =&gt; $term-&gt;tid),
  ),
);


That should make it reusable across different environments (provided the vocab only has one term with the name "External").