function content_rules_action_populate_field in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 6.2 includes/content.rules.inc \content_rules_action_populate_field()
Action: populate a field.
1 string reference to 'content_rules_action_populate_field'
File
- includes/
content.rules.inc, line 31 - Provides basic rules module support.
Code
function content_rules_action_populate_field($node, $settings, $element, &$state) {
// Get information about the field.
$field = content_fields($settings['field_name'], $node->type);
$value = _content_rules_get_field_value($settings, $state);
if (!empty($field) && is_array($value)) {
$node->{$settings}['field_name'] = $value;
return array(
'node' => $node,
);
}
}