1

I would like to create an editable task table with slickgrid view, where each row is a node (of content type 2) that will be created automatically by a different content type (the 1st content type) or a webform.

Content type 1 - The 1st content type have 4 fields (this node will create automatically some nodes of the second content type)

1st - "Days" - is a Date field type - with unlimited (1 to 10) values

2nd - "City's" - is a Reference to a Term - with unlimited (1 to 10) values

3th - "Type of operation" is a Reference to a Term - with an unique value

4th - "Number of person by city" is a Integer field type - with an unique value

Content type 2 - the 2nd content type have those fields

1st - "Day" - is a Date field type - with an unique value

2nd - "City" - is a Reference to a Term - with an unique value

3th - "Type of operation" is a Reference to a Term - with an unique value

4th - "Name of a person" is a text field - with an unique value

Now for example if i create a node of Content type 1 with 5 values for the date field and 5 for the City's and the number "2" for the integer field, it will create automatically 5*5*2= 50 nodes of Content type 2, the "name of a person" field will be created empty of course.

I think i must create a module or perhaps with rules it's possible ? is it possible to replace the content type 1 by a webform? I'm newbie in drupal module developement. Thanks.

1 Answer 1

0

Custom module is the best way to go. With rules it's really complex. You need to use below hook in your custom module to solve above problem.

  • hook_node_insert to hook into above node creation. Hook Responds to creation of a new node.
  • In above hook implementation you need to create new nodes using code. Please find article which explains same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.