I'm trying to program a field collection with field collection item fields like the code as given by rbruhn on Creating field collection programatically. I want to create it on an easier level for testing purposes. My goal is to create a taxonomy reference dropdown and a textfield.
I managed to reproduce the field_collection type. However, I can't reproduce any field collections item fields.
Let's say I want a textfield in my field collection. Creating an ordinary textfield field collection item field would make sense to me, but it doesn't work.
Can someone tell me what I am doing wrong?
Instead of appearing inside my field collection, it appears as a field inside my node which contains my field collection field.
array( 'field' => array( 'field_name' => 'name_of_my_field', 'type' => 'text', ), ), 'instance' => array( 'field_name' => 'name_of_my_field', 'entity_type' => 'field_collection_item', 'bundle' => 'name_of_my_field_collection_field',, 'widget' => array('type' => 'text_textfield'), ) ),