/ Published in: PHP

This script is a custom module to copy one field to another.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function copyfield_cron() { // Get all video nodes $type = "video"; foreach($nodes as $node): // Extract the video path field. $videoPath = $node->field_video_path['und']['0']['value']; // Save the filed to another field. $node->field_video_url['und']['0']['value'] = $videoPath; // Save the node node_save($node); endforeach; }
Comments
