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

clarkburbidge’s picture

Component: Module Integrations » Miscellaneous

This seemed to work!

$scoreval = $node->field_suggestion_flag_score[0]['value'];
$scoreval++;
return array(
0 => array('value' =>$scoreval)
);

clarkburbidge’s picture

Status: Active » Closed (fixed)