Drupal Questions & Answers

Ask and answer Drupal related questions! No question too simple or complex!
SIO's picture
Asked by on Sat 4th Jun 2011
Problem with : computed field

Hi, I’m trying to display a view with a computed field ;
The php code is : $date = $node->field_planning_maj0[‘value’];
$djour = date(‘Ymd’);
$date1 = strtotime($date);
$newdate = date(“Ymd”, $date1);
$new = strftime(”%A %d-%m-%Y à %H:%M”, $date1);
if($newdate <= $djour )
$node_field0[‘value’] = $new;
$node_field0[‘value’] =”“;
the problem is when I created or updated a node, the field appears but when I click in the navigation menu, it doesn’t appear : The display shows an empty field in the view.
I have no idea, somebody can help me.

Commenting on this Drupal Question is closed.