About the computed field

Events happening in the community are now at Drupal community events on www.drupal.org.
lakbaytaodev's picture

Greetings! On CCK, I added computed field to facilitate calculations however I'm now stock. My inquiry is this one: how do I multiply two fields to get pasted into the computed field itself like for instance field_dealersprice multiplied by field_dealers_discount.

I try to use this code:

$node_field[0]['value'] = "$node-> field_dealersprice [0]['value'] *$node-> field_dealers_discount [0]['value']";

but its not working. Any tip and advice? Matsalams.

Comments

Computed Code:

jmolinas's picture

Computed Code: $node_field[0]['value'] = $node-> field_dealersprice[0]['value'] *$node-> field_dealers_discount[0]['value'];
Display Format: $display = ''Php". $node_field_item['value'];
Data Type: float
Data Length: 10,2
Default Value: 0.00
check "Not NULL"
check sortable

Hi Joseph, Thanks on this

lakbaytaodev's picture

Hi Joseph,

Thanks on this one. I will try this out.

Linux Registered User #383849

The code WORKED! Maraming

lakbaytaodev's picture

The code WORKED! Maraming salamat.

Linux Registered User #383849

Philippines

Group organizers

Group categories

Post category

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week