I am trying to figure out how can I add multiple field collections to a node when a user starts filling out a node.
Here is how my nodes are basically set up:
Color Card Content Type:
- id
- name
- colors_term_reference(multi select)
Style Content Type:
- id
- color_card_node_reference (select)
- color_images_collection (unlimited field collection)
- color_term (single select)
- image
When a user starts filling out the node form, I want the field collections to get created and all the colors that were chosen in the color card get preselected.
So ideally if color has the following colors: red, blue, and green, when a user starts filling out my style node and chooses that color card the field collection would have red, blue, and green preselected and they would only need to upload the images.
Color Card:
- id: 1
- name: Cool Colors
- colors_term_reference:
10 (red)
17 (blue)
38 (green)
Style:
- id: 1
- color_card_node_reference: 1
- color_image_collection:
0:
color_term: 10,
image:
1:
color_term: 17,
image:
2:
color_term: 38:
image: