How to remove labels from drupal date_popup fields in custom module

    You can do this using below code in custom module
    /**
    * Altering Date Popup to remove labels and description for specific field
    */
    function <module_name>_date_popup_process_alter(&$element, &$form_state, $context) {
    if ($element['#name'] == '<fieldname>') {
      unset($element['date']['#description']);
      unset($element['date']['#title']);
    }
    }

    /**
    * To remove for all date fields remove if statement
    */
    5
    Average: 5 (1 vote)