Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
edited tags
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

I'm trying to implement creation of child nodes programmatically in hook_submit when creating parentcreate child nodes according to thea parent nodenode's field value. Here is the idea. Parent node: field_stages (unlimited count). I want to create new "stage" nodes when I've added new parent

When a node and saveis created, a reference to these child nodes is saved in the parent node, although the references should not be editable and visible in add/editthe edit form and when the node viewis viewed. 

How it can be implemented in drupalI implement this?

I'm trying to implement creation of child nodes programmatically in hook_submit when creating parent nodes according to the parent node field value. Here is the idea. Parent node: field_stages (unlimited count). I want to create new "stage" nodes when I've added new parent node and save a reference to these child nodes in parent, although the references should not be editable and visible in add/edit form and node view. How it can be implemented in drupal?

I'm trying to programmatically create child nodes according to a parent node's field value.

When a node is created, a reference to these child nodes is saved in the parent node, although the references should not be editable and visible in the edit form and when the node is viewed. 

How can I implement this?

edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Source Link

Creating child nodes when creating parent

I'm trying to implement creation of child nodes programmatically in hook_submit when creating parent nodes according to the parent node field value. Here is the idea. Parent node: field_stages (unlimited count). I want to create new "stage" nodes when I've added new parent node and save a reference to these child nodes in parent, although the references should not be editable and visible in add/edit form and node view. How it can be implemented in drupal?