Community Documentation

Copy One EMail Field to Another EMail Field Within Same Node

Last updated May 28, 2011. Created by itserich on May 28, 2011.
Log in to edit this page.

Tokens will not work for copying many cck fields because the fields have restrictions.

For instance, I wanted to copy email fields to another email field within the same node. The token will not be accepted.

Inserting php into "Advanced: Specify the fields value with PHP code" is an alternative.

Rule Action is:

1-Populate a Field, with the new Email Field selected
2-PHP Code:

return array(
  0 => array('email' => $node->field_email_single_field[0]['email']),
);

The name of the field is 'field_email_single_field' and inserted as shown above. 'email' is the type of field.

About this page

Audience
Site administrators

Site Building Guide

Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here