Field collection is a module that provides a field-collection field to which any number of fields can be attached.

learn more… | top users | synonyms

0
votes
0answers
12 views

How to programmatically render a field collection in Drupal 8?

For "normal" fields, this works: $node = \Drupal::routeMatch()->getParameter('node'); $field = $node->field_foobar->value; print render($field); But if the field is a field collection, it ...
0
votes
0answers
11 views

How to do avoid submitting and reloading the entire form during “Add more item” in the drupal admin system?

In my drupal admin, I have a custom content type input form. Basically we enter some project details and each projects has multiple credits associated. Each credit items are then added via "Add more ...
1
vote
1answer
17 views

SQLSTATE[42000]: Syntax error or access violation in drupal views query [on hold]

When trying to preview a view containing references to three Field Collection module fields, I get the following error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in ...
0
votes
1answer
25 views

Invalid datetime format for a field never submitted?

I'm working my the edit page for my mobile app which is fetching data from a Drupal site. I'm fetching data, I'm editing it, and submitting it. However, when submitting back, I'm getting Internal ...
1
vote
2answers
34 views

Restrict “add more” button to add new fieldset after adding 5 fieldsets

I have taken a field of type field collection in my user-profile-form and its cardinality is set to unlimited as I wanted to have "add more" button for the users. I want to restrict the addition of ...
0
votes
0answers
10 views

Field Collections Arrays

I have done my due diligence, but can't find an answer anywhere. I am trying to pop an array in a field collection and then implode it. Here is my code, which is not working. Also, I am not sure if ...
1
vote
1answer
19 views

How to get the data of field collections

I have one field collection with 4 fields. How to get the data of field collection in views tpl file I am trying to load data as field_collection = entity_load('field_collection_item', ...
0
votes
1answer
8 views

Add more fieldset with remove option custom module

I'm developing custom module and there's one fieldset that can be added multiple times and can be removed any particular entry also. Can anyone please suggest to achieve this? Here is my code: ...
0
votes
0answers
9 views

Drupal File Collection module has widget that's not 508 Compliant

So I am using the Field Collection module in Drupal 7 and I have a field in a content type that is of type Field Collection and the widget is Embedded. Now my site has to be 508 Compliant, I am ...
0
votes
1answer
17 views

Setting a field collection default value for a field using form

I'm trying to set up a default value programmatically to my field which is in field collection. This has proved quite hard and I cant seem to get around it. Any assistance will be appreciated. This is ...
0
votes
1answer
32 views

How to submit a field collection from a form into a created node

I would really appreciate if somebody could help me with this :) I have a field collection called field_formations. Inside it I have 2 fields: field_technologies - (reference to a taxonomy). ...
0
votes
0answers
10 views

calculate nested field collection with computed field

I have this complex collection field in content type collection field "parent" - computed field "a" (sum all computed field "b" listed in collection field "a") - collection field "a" (unlimited ...
1
vote
1answer
30 views

field collection - taxonomy term can't display

I used taxonomy term with field collection and taxonomy term can't display look this video https://www.youtube.com/watch?v=cEI1yDcJXT4
0
votes
0answers
17 views

field collection - taxonomy terms [duplicate]

I used taxonomy term field with field collection and taxonomy term id not attached on node id. taxonomy term cannot get result. look video! used D8 but in D7 have the same problem. the same problem ...
0
votes
1answer
18 views

ajax_command_invoke adding a new item in a field collection

I'm using the field_collection module. A collection has a "custom field" I've created, which rely on a jQuery plugin. When I add another item in my collection, the jQuery plugin is no more invoked, ...
3
votes
1answer
102 views

How to save custom commerce_profile_reference field widget data

Description: My drupal commerce line-item's have extra "add-to-cart form" fields attached to the line-item type. One of the fields is a field-collection that contains 2 fields: A ...
1
vote
1answer
57 views

How to store values to field collection or paragraphs programmatically?

How do I store values to either a field collection or a paragraphs field programmatically? Could somebody please provide a working code example of how you do this? I would have a field holder ...
0
votes
0answers
16 views

How do I change field handler_settings within hook_form_alter?

I have an entity reference field that is inside of a field_collection (D8) and I need to alter it's views arguments during ajax load to pass in the value from a preceding field on the host entity. I ...
0
votes
1answer
18 views

Update existing field collections with Migrate module

How can I update existing field collection entities using Migrate module? I wasn't able to find any examples at the official documentation page, nor anywhere else. When I'm migrating nodes, I can do ...
1
vote
1answer
29 views

Let the user choose the field type

I'm working on a drupal project and part of it is a sort of "tile overview" page. Its a 3x? grid, with a variable length. |--|--|--| |--|--|--| |--|--|--| |--|--|--| .. .. .. Sort of like that, I ...
0
votes
1answer
41 views

How to create a confirm popup when delete item with field collection in drupal 7?

I have configured a field collection field (unlimited items) for a content type and I want create a confirm popup when user delete an item. For this, i found that i can directly go and modify 2 ...
1
vote
0answers
27 views

Get value from field outside field collection

I have the following setup: Field price (boolean) Field collection Field amount (decimal) Field total (computed) How can I load the "price" field inside the "total" computed field to calculate ...
0
votes
1answer
18 views

Avoid duplicate ID for a field that appears multiple times on the same form

I'm having a problem with duplicate ID's for a custom field widget. The scenario: I have an order form, that contains 2 field collections "pick-up" & "delivery". Both these collections contain ...
0
votes
2answers
18 views

Cannot use fields as product attributes if they are within a field collection

I am building a commerce marketplace, and have several field that I am reusing on multiple product types. It's getting tedious adding them over and over, so I'd like to include them in a field ...
0
votes
0answers
10 views

How to create a view that displays all entities linking to current entity when using field collections

I am trying to create a view that displays all nodes of type A that reference the currently viewed node (node of type B). The reference is made through a field collection field. Below is a schematic ...
0
votes
1answer
24 views

hook_node_update hitting a wall with a loop I created

I have a taxonomy multi-select list that is used to create/delete entries in a field collection in my node. I'm trying to make it so that if the user deselects an item from the taxonomy list, the ...
0
votes
0answers
20 views

How to programmatically add 2 field collection items to a node in node_presave

One of my content types has a field collection field, that field collection has one link field in it. Each node needs two instances of that field collection field, and I need to be able to add them in ...
0
votes
3answers
245 views

Extracting the values of Field Collection

I have created a foreach loop in my node template in Drupal 8 where values of the field collection are being printed as 1 and 2. Instead I want the content of the field collection which includes an ...
0
votes
1answer
12 views

How to fix field collection ajax #edit-submit clash with node #edit-submit?

I have Drupal 7.41, field_collection 7.x-1.0-beta10+1-dev, and field_collection_ajax 7.x-1.x-dev I am the admin of a site where we have a disease content type, and a part of each disease node is its ...
0
votes
0answers
11 views

Migrate FieldCollection with host entity FieldCollection

in our Drupal application, we have a few field collections that themselves have field collections. It looks like this: field_collection1 ├── field_xyz ├── field_collection2 └── field_collection3 ...
0
votes
1answer
34 views

View displaying field collection items based on taxonomy term

I have a set of nodes that include a field collection item GeoImages. (Each node can contain multiple Geoimages, if that's relevant). Geoimages includes (among other fields) an Image and and Image ...
0
votes
1answer
66 views

Building a full featured gallery with voting system

I'm looking for a way to build a simple gallery node type in Drupal, with vote (with Votingapi and Fivestar)per image enabled. (1 vote per image, per node, per user, and users are able to vote on any ...
0
votes
1answer
20 views

Show/hide fields bij adding content based on checkbox

Is there a way to hide a specific or specifics fields in Drupal when you create content until you checked a checkbox? Now it looks like this: I need something like this: But I need some ...
0
votes
0answers
25 views

“Missing bundle property on entity of type node” when migrating field collection

I'm trying to import field collection entities using Migrate and MigrateD2D (the sites on both sides are D7 sites with the same content types and field collection fields). I followed the instructions ...
0
votes
0answers
25 views

Views 8.x fields collection relationship

In D7 views it was very easy to get to a particular field from field collection - by relationship. How about now? I can not see any relationship connected with this collection. I am able to display ...
1
vote
1answer
51 views

How can I combine the fields of two field collections in my theme?

Note: I've not accepted an answer on this because the answer I got wasn't what I needed. In the end I abandoned field collections in favor of paragraphs for this task. Update: I really appreciate ...
1
vote
1answer
38 views

How to get the NodeID from ItemID of connect Item from Field Collection

I have a nodetype which is has a connected field collection (multiple values). In this case one of items of the collection is a date and I have got the ID of this one. So: ...
0
votes
1answer
33 views

Token for field in field collection

I have a field collection with 3 fields (title, image and link). I'd like to link the title and image to the value of the link field. I'm using the linked field module to make the fields linkable and ...
0
votes
2answers
31 views

How to do some calculations using fields within a Field Collection field?

I have a Field Collection field and I'm trying to do the following: Multiply the value in one field with the value in another field and have the result shown within a third field. I have tried ...
6
votes
1answer
151 views

Field Collection vs. Paragraphs

I used Field Collection in my previous sites and I faced some performance issue, So this time I am looking a alternative for Field Collection. I find a answer Alternative to Field Collection. but I ...
0
votes
2answers
20 views

Does having too many cck fields negatively affect site speed and performance?

I building a site that could potentially utilize 50 different content types. The most of the content types have more than 40 CCK fields, including multiple field_collections entity_reference. How can ...
1
vote
1answer
74 views

Remove field-collection-view and field-collection-container fromt field output

I am using the following modules: Paragraphs Field Collection I am trying to Foundation 5 classes to re-create the zurb foundation orbit slider with unlimited slides. Initially my problem was ...
0
votes
0answers
25 views

Add set of fields to every field - how to implement?

We have a new requirement that we need to keep information (a set of attributes) associated with every field of content type A. This is essentially meta-information about any given field's data. (I ...
2
votes
2answers
54 views

array_flip(): Can only flip STRING and INTEGER values with nested Field collection [closed]

I'm getting the error Warning: array_flip(): Can only flip STRING and INTEGER values! in EntityAPIController->load() when using a field collection in another field collection. Is this a bug in ...
1
vote
3answers
45 views

Views custom style

I have a field collection displayed in a view. Currently, it renders it this way: I'd like to render all items in one green box though, not all items in a box seperately. I thought I would be able ...
0
votes
0answers
15 views

Field collection item display settings

For a certain content type, I used field collection item to display a set of documents. The collection item's name is "Name1". I then added a field to the field collection item. It's name is also ...
0
votes
1answer
6 views

Unable to save field collection order of collection that includes entity reference anymore

I have a Drupal 7 site using field collection and entity reference. The collection includes one entity reference and a boolean checkbox. It is used to related "news" nodes to a page. The checkbox ...
0
votes
0answers
16 views

How to: Iterate a field collection when constructing a rule

I'm trying to write a rule that will send an email to users of a role. Within the body of the email, I'd like to display the contents of a nested field collection. I've tried using what rules gives me ...
0
votes
0answers
29 views

update a field-collection from a computed field

I'm able to retrieve the fields of the field collection attached to my content type, using codes like : foreach ($entity->field_collection[LANGUAGE_NONE] as $line) {..} or from an entity ...
0
votes
1answer
41 views

Overriding Field Collection output

I have a content type named: lectures In this content type I have a field collection field named: field_course_video_slide_sync This field collection consists of 3 fields: field_start_slide_sec, ...