computed fields

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

About the computed field

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.

Read more
timothykc's picture

Question about computed fields + user-reference module (D7)

I'm struggling to come up with tidy little snippet for a computed field to interact with the user reference module.

The big picture:

  • I use profiles for Department Faculty so that they can log in and manage their own info.
  • In order to link content types I want to associate with a particular faculty person (say, a book section), I add the user reference field.
  • I find it handy to sort by the faculty member's last name, so I want the computed field module to pull the value from the user-reference field and trim it.
Read more
Subscribe with RSS Syndicate content