Prevent hook_form_alter to works only on frontend not in admin?
you could use the global variable $user to achieve it.

&lt;?php

function MODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  global $user;

  if($user-&gt;uid == 1) {
    return;
  }
  else {
    //alter fields logic goes here
  }
}