drupal 8 隐藏表单特定字段
通过hook_form_alter修改表单,方法如下:
function module_name_form_id_alter(&$form,&$form_state,$form_id){ $form['field_name']['#access'] = FALSE; }
更多阅读

通过hook_form_alter修改表单,方法如下:
function module_name_form_id_alter(&$form,&$form_state,$form_id){ $form['field_name']['#access'] = FALSE; }