How can I hide field labels without using any CSS style? How can I hide field labels from Drupal (without CSS)?





function clean_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == "user_register_form") {
    $form['account']['name']['#title'] = Null;
    $form['account']['name']['#description'] = Null;
    $form['account']['name']['#attributes'] = array('placeholder' =&gt; t('Имя пользователя'));

    $form['account']['mail']['#title'] = Null;
    $form['account']['mail']['#description'] = Null;
    $form['account']['mail']['#attributes'] = array('placeholder' =&gt; t('mail'));    
  }
}


I don't know how to write for password and date.
Go to "Admin > Content Type > Manage Display" and hide the labels as shown in the screenshot.