How to hide a field (cck) based on a date field? I am looking for a way to hide a content field based on the nodes date field.

Example:

Event Name: Some Name Here

Event Date: 12/12/2012

Event  Location: Somewhere

Buy Tickets: ticket.com

If the date has passed I would like the Buy Tickets field to not show ... any help would be appreciated.
The solution is very simple. In template.php file implement MY_THEME_preprocess_node(). Example:

function MY_THEME_preprocess_node(&amp;$variables) {
  //  dpm($variables);
  if($variables['type'] == 'MY_CONTENT_TYPE') {
    $date_field_value = $variables['content']['field_DATE_FIEL_NAME'][0]['value']; // find the correct value of your field

    $converted_date = strtotime($date_field_value);

    if(time() &gt; $converted_date) {
      hide($variables['content']['field_DATE_FIEL_NAME']);
    }
  }
}


you can also use hook_node_view:

function MY_MODULE_node_view($node, $view_mode, $langcode) {
  if($node-&gt;type == 'MY_CONTENT_TYPE') {
    $date_field_value = $node-&gt;content['field_DATE_FIEL_NAME'][0]['value'];

    $converted_date = strtotime($date_field_value);

    if(time() &gt; $converted_date) {
      hide($node-&gt;content['field_DATE_FIEL_NAME']);
    }
  }
}