Hide text field in hook_form_alter
Using the hook_form_FORM_ID_alter format is ideal:

function MODULENAME_form_CONTENTTYPE_node_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form['field_agent_name']['#access'] = FALSE;
}


More info on hook_form_FORM_ID_alter