Hi,

I have a field_rentpw which is a computed field and should indicate "Rent Per Week" based on what users enter in the field "Rent PCM" (Rent Per Month).
So the formula that we need is: RentPW = RentPCM * 12 /52

It D6 I had a simple $entity_field[0]['value'] = ($field_rentpcm[0]['value'] * 12 / 52); and it worked like a charm.

This is what I have in D7

// Load the currently viewed node object into the $node variable
$node = menu_get_object();

// Get the field_rentpcm field for the node
$rentpcm = field_get_items('node', $node, 'field_rentpcm');

$rentpw = $rentpcm[0]['value'] * 12 / 52;


// Set the price variable as the output for this field
$entity_field[0]['value'] = $rentpw;

Once I save the node, the RentPW shows up. But once I go to the front page, which is a list view, the RentPW doesn't show up (as if it is not being stored in the database).

Please help!!!! What am I doing wrong? I have spent hours upon hours (most of this day) reading through the documentation and tutorials, but they are mostly for D6. So Please help!