You are here

function rb_cck_action_copy_field in Rules Bonus Pack 6

Action for 'rb_cck_action_copy_field'.

File

./rb_cck.module, line 702
Functions for extending CCK field management with Rules.

Code

function rb_cck_action_copy_field($source, $target, $settings) {

  // Set the target field in the target node.
  $target->{$settings['target_field']} = $source->{$settings['source_field']};

  // Return the target node for saving by Rules.
  return array(
    'target' => $target,
  );
}