1 date.elements.inc date_hidden_element($element)

Determines if the date element needs to be processed.

Helper function to see if date element has been hidden by FAPI to see if it needs to be processed or just pass the value through. This is needed since normal date processing expands the date element into parts and then reconstructs it, which is not needed or desirable if the field is hidden.

Parameters

array $element: The date element to check.

Return value

bool: TRUE if the element is effectively hidden, FALSE otherwise.

File

core/modules/date/date.elements.inc, line 1831
Date forms and form themes and validation.

Code

function date_hidden_element($element) {
  if ((isset($element['#access']) && empty($element['#access']))
   || !empty($element['#programmed'])
     || in_array($element['#type'], array('hidden', 'value'))) {
    return TRUE;
  }
  return FALSE;
}