Closed (fixed)
Project:
Rules
Version:
6.x-1.1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2010 at 17:36 UTC
Updated:
26 Mar 2010 at 06:12 UTC
I'm looking for some php help in the "Advanced: Specify the fields value with PHP code" form of the "Populate a field" action.
I have an integer CCK field called "field_suggestion_score" that I'd like to increment. I don't get the "return array" suggested code. I'd be willing to add this snippet and method to the documentation if someone could help me in the right direction.
Thanks for the great module!!
Comments
Comment #1
clarkburbidge commentedThis seemed to work!
$scoreval = $node->field_suggestion_flag_score[0]['value'];
$scoreval++;
return array(
0 => array('value' =>$scoreval)
);
Comment #2
clarkburbidge commented