I haveHow to pre populate a node which has one field and one field collection field, the with multiple values?
I have a node type with a field collection field which has four fields and cardinality is set to unlimited.
In my custom module I implement hook_form_alter and assign data as default valuevalues to the field and the field collection fields inside a loop(loop goes for 32 times). But, but it displays only one field collection. I tried to set the cardinality of the field collection field to 32the number of items I want, but failed(can't as I can't find a way to set the cardinality programmatically). How to prepopulate this type of node?