Populate child node with CCK Parent node field

Parkes Design - July 13, 2009 - 15:20
Project:Node Relativity
Version:6.x-3.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi firstly great module, it has been very useful for me.

I have a question, how would I go about populating a child node cck field with a parent node field data?

Say that the parent node's content type is Job Details and it collects information about the job like address etc and the child node's content type is Inspection and it collection information about an inspection but also has duplicate information from the parent node. Is there a way to auto populate the fields without using the prepopulate module that allow users to see sensitive information in the url and browsers history?

Thanks any help would be appreciated.

#1

Parkes Design - August 18, 2009 - 04:42

Is there a way to achieve this? any suggestions?

#2

terry22 - August 31, 2009 - 16:29

I 'm also interessed in doing this

#3

Parkes Design - September 8, 2009 - 01:28

Terry... I found another solution by not using node relativity but a combination of modules to achieve the same result. Node Relationship, node ref url and rules.

#4

Village Internet - October 8, 2009 - 14:36

I was able to add the parent node to the child doing this:

Create a field in the child content type,
Under 'Default Value', PHP code add:

$parent = is_numeric(arg(4));

if($parent == true){
return array (
0 => array ('nid' =>arg(4)),
);
}

 
 

Drupal is a registered trademark of Dries Buytaert.