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
16 views

How do i print field collections which are a field of another field collection in node.tpl.php files?

I am using the following code to embed a field collection inside node.tpl.php files: <?php global $base_url; $wrapper = entity_metadata_wrapper('node', $node); $formtype = field_get_items('node', ...
0
votes
0answers
13 views

How order elements of multiple collection field?

My custom module allows to add and set collection fields of some contents. I would like to order this fields like this : My actuel structure data after one ...
0
votes
1answer
22 views

How to get the highest value of a specific field in a multivalue field collection

How to get the highest value of a specific field in a multivalue field collection, USING PHP? This is about displaying the right discount for a marketplace product. There is a node type Product with ...
0
votes
0answers
20 views

How to create a Rules action set to calculate a sum of integers in a Field Collection?

I'm having a Field Collection 'My List' with two fields: 'Amount' (integer) and 'Date' (date). I often count the 'Amount' items with Rules like this: Add a variable: Parameter: Type: Integer, Value: ...
0
votes
0answers
20 views

Field Relation Between Content Types and Some Questions

I have two content types (Movies and Actors), both with picture and name fields. In Movies I have a field collection with two fields: name and character. This name field is a node reference to Actors ...
0
votes
1answer
32 views

What is the preferred way to delete large amount of data from a Drupal site?

We have a client site that currently has a very, very large data set in Drupal. We are working on generating a 'stripped' copy of the database to be used for testing new code by eliminating the bulk ...
1
vote
2answers
20 views

Turn off revisions for content types that contain certain types of fields (e.g. Field Collection)

The Field Collection module does not support revisions. Yes there are lots of patches which are still under review. But what I want to do is create a module that on the node edit screen, queries the ...
0
votes
1answer
25 views

Entity metadata wrapper, get field collection in field collection

I want to get (and to set after) the value of a field collection in a field collection (multidimensional field content). This is my code : // The node is a custom content. // I get the list of ...
1
vote
2answers
30 views

Updated an empty field collection in Drupal7

New to Drupal and I'm assuming the answer is simple, I've looked through the test suites etc. and still missing the point it seems. I have a node with a field collection (field_theatre_date_set) that ...
7
votes
3answers
193 views

Field Collection vs Entity Reference

How is field collection an advantage? You can do the same thing with a new content type pointing to the parent with an Entity Reference. Maybe someone can break down some situations where each one ...
0
votes
2answers
51 views

Solution to migrate a field collection

My requirement is to migrate content nodes in xml format to drupal 7 content type fields.The xml contains a node which has to be field collection in drupal.I know how to migrate field which are enity ...
1
vote
1answer
42 views

Modify and add of unlimited collection field

I have a content who contains an unlimited collection field. Via a custom module, how can I get and set the informations which are in field collection in the content (nid) ? I have read the api ...
0
votes
1answer
30 views

Field Collection Major Error! Help Needed!

Here what my screen looks like when I try to add new field collection item. http://i58.tinypic.com/hrf11d.jpg Then I got this message in Chrome when going back to the previous page in browser: ...
0
votes
1answer
8 views

How to delete all but the current revision from the field_collection_item_revision table?

I have a Drupal 7.24 Website making heavy use of field collections. The field_collection_item_revision keeps getting bigger and bigger (9'000'000 rows) and only 200'000 entries are in ...
0
votes
1answer
24 views

How to form_alter fields attached to an unlimited field collection?

Here are 2 unsuccessful experiments I've done: <?php /** * My first attempt with implementing hook_form_alter. */ function MYMODULE_form_alter(&$form, &$form_state, $form_id) { switch ...
0
votes
0answers
18 views

How can I filter nested taxonomy terms with field collections?

I have a content type Recipe that has a collection field called Ingredient. Each Ingredient collection field item has a hierarchical taxonomy term called Food. For example the Food taxonomy ...
1
vote
1answer
33 views

Create field collection item in drupal 7

I am trying to dynamically create a field collection for a node. Field collection item (field_markers) is used to create a point or a polygon for a map content type. During debugging I found that my ...
0
votes
0answers
16 views

Add classes to Field collection Items

I want to add classes to the Field collection items (multiple value field), for a stored value earlier generated by HOOK_preprocess_node. What is path / array to get to the classes_array for the ...
0
votes
0answers
30 views

How to access multiple values of field collection in node.tpl?

I have field collection for one of my content type. The fields in field collection are Title Body Image The field collection can have many values at a time. I tried to get the values using entity ...
0
votes
0answers
10 views

Update fieldcollection on node save/update

I have a rather complex setup here. A node contains some fieldcollections as well as some custom form elements. On save, the values from the custom form elements, should end up in the ...
0
votes
1answer
53 views

Render field collection multiple times on node.tpl.php

I have created a custom view mode for field collections with this code: /** * Implements hook_entity_info_alter(). */ function view_modes_entity_info_alter(&$entity_info) { ...
0
votes
0answers
20 views

Save field collection item programmatically

I'm trying to set the postal code for a user. The postal code is a field of the Address Field module and the address field is in a field collection. I can read the postal code value using this: ...
0
votes
1answer
49 views

Field collections data not being saved

I am working on a website which has many Entity forms and some of the Entity form has field collection with few fields in it and it allows multiple items "Unlimited". When you save the node, the data ...
0
votes
1answer
29 views

How to print node embed field in field collection

In one of my content type i am using field collection(Title, Image, Body). I am using node embed to embed node titles of certain content type in one of my content type. The issue i am facing is that ...
0
votes
0answers
14 views

How to reset a Field Collection to its basic, unpopulated state via hook_form_alter()

I am doing a form alter on a node edit form with a Field Collection which may have been previously populated. I want to discard any previous data entered into the fields within the collection so it ...
0
votes
0answers
20 views

how can I hide field collection item

I know I can hide form field element by $form['element']['#attributes']['style'][] = 'display:none;'; or hide($form['element']); but when I try to hide field collection element by ...
0
votes
0answers
22 views

Drupal Content API: show actual values of field collections

I am currently a maintaining a system, and I'm trying to figure out how to expose certain fields using Content API. I have already setup the Content API module, and is successfully returning thru ...
2
votes
1answer
68 views

How do you populate an image field in a field collection programmatically?

I'm trying to do a large import that's more complex than feeds can play nicely with, so I'm in the process of writing a custom import script. Everything works except loading images that are associated ...
0
votes
1answer
28 views

Field collection item not visible to anonymous user

I have a field collection, 'related content', that displays inside the 'page' content type tpl. It is a 'field' in the page content type. It works perfectly fine while logged in as admin, but cannot ...
0
votes
0answers
13 views

set permissions on an entity as though it were a node

I am using the Field Collection module to create entities for other nodes. I would like to administer the creation/editing/viewing permissions for these entities using the permissions page in the ...
0
votes
0answers
14 views

Field Collection - prevent one user from change values set by another user

I have added an (unlimited) field collection to on of my content types (LISTS) which contains several fields (POINTS). I am looking for a way to prevent users from altering or deleting instances of ...
0
votes
1answer
27 views

Unlimited value fields numbered

Is it possible to show a numbered output to an unlimited value field (in the input form rather than the display). Basically I have a field collection and I'd like to show by the side of each one ...
0
votes
1answer
37 views

Hiding a field title label of a field collections field?

I have created several fields using the field collection module, but I cannot hide one of the field labels (within a collection). I've tried it in the UI and I've tried hiding it programmatically with ...
1
vote
1answer
82 views

How can I delete all field collection revisions?

I want to delete all field collection revisions of a specific field. I found deleteRevision for this job, but I don't know how to use it. (I couldn't find any example of it.) Anybody know how ...
0
votes
1answer
32 views

Create user with field collections programmatically

This is what I use to create the user: $new_user = array( 'name' => $form_state['values']['email'], 'status' => 1, 'access' => REQUEST_TIME, 'roles' => ...
0
votes
0answers
11 views

How to force Unique Value for a taxonomy in Field Collection?

I have a Content Type that has Field Collection : Fruits item in it which has unlimited values, in the Fruits Field Collection item I have Term Reference : Fruit List item as list that has the values ...
1
vote
1answer
34 views

Slow migration process when migrating nested field collections

I'm migrating a site with something like 2000 nodes each having some field collections with other field collections nested in them. Basically, example node looks like this: level 1 ...
0
votes
1answer
49 views

Services Entity REST Application - Update (via put) Field Collection Data

I am trying to figure out what the format and required parameters are for an update request to a field collection via the Services Module's REST API. I have installed the Services Entity API Module to ...
0
votes
0answers
60 views

Formatting Field Collection data with Views Data Export (CSV)

I've got a Field Collection on use in a basic page content type on my Drupal 7 site. I've built a view with the Data Export module that is outputting the data from nodes of this content type as a CSV. ...
0
votes
0answers
22 views

Node template : render($content['field_website']) has no output

I'm doing some work on a client's Drupal 7.14 website and I'm encountering weird behaviors. I'm trying to theme a node type, so I've created a node--partner.tpl.php in my theme's template folder. ...
0
votes
0answers
48 views

How to combine Select (text) & Text fields into a custom form

I need to produce a form (webform, entityform) where various options are presented to users. It should look like a Select (text) field that uses the radio button/check-box widget. The twist is that ...
1
vote
1answer
74 views

Why some fields values are getting empty when editing a node?

I have created a content type with 3 field collections and a Text. I've set each to have unlimited values. Data entry for all the fields are OK and when viewing the node all the fields data are ...
0
votes
0answers
32 views

How to run a rule before updating content?

My 'Article' nodes have a field collection 'Collection'. I created a rule with the event "After updating existing content of type Article" in which I'm looping over 'Collection' for the changed and ...
0
votes
0answers
56 views

Field collection - child fields adding class and weight

I've recently installed the Field collection module on Drupal 7. I have a field collection filled with 3 fields: field_text_section field_image_position field_image_section field_image_position ...
0
votes
0answers
20 views

Export a field with its content out of a field collection

I am actualy stuck in some kind of trouble. The last couple of days, I created a test stage for one of my websites to integrate Search API Attachments ...
0
votes
1answer
27 views

Migrating nodes with image- and textfield to file-entity with image and description

What is the approach to convert existing nodes consisting of a multivalue field-collection-field (containing an image-field and a textarea-field as caption) to the file-entity which the media module ...
0
votes
0answers
22 views

Trying to sort my Field Collection nodes through Tags

I am so desperate to find some help here. What I did is:- For one of my requirement, I created Field Collection content type which has a field called Tag among other fields. This is shown below:- ...
2
votes
1answer
55 views

How to check if field in Field Collection is required?

I'm running into a problem of programmatically checking fields in a field collection. What I want to do is loop through all fields within a field collection and check which ones are required. I've ...
1
vote
0answers
38 views

How to get/provide tpl file of editing a field collection?

I want to theme a my collection field on the edit page. I have several fields in one collection and that collection gets all the height of the screen. Though, I want the values of the collection ...
1
vote
1answer
41 views

Programmatically printing from field_collection array

Is there any simple way to print a certain number of elements from a field collection? Say I have an array of 8 elements and want to just print 4 at the top of a page; then, print the other 4 at the ...