Questions tagged [drupal-field-collection]

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

A field collection is internally represented as an entity, which is embedded in the host entity. Thus, if desired field collections may be viewed and edited separately too.

34 questions
4
votes
1 answer

How to create a link to edit a specific field value of a node inside views using views php?

I am using views php by adding a custom php code field to my view display, so I have the $data variable available. Inside the custom php code, I am rendering fields that have been added with a field collection relationship:
Alex
  • 9,911
  • 5
  • 33
  • 52
3
votes
1 answer

How to create a field_collection_item using the RESTful Web Services API in DRUPAL 8

I have installed RESTful Web Services on my Drupal 8 site, I activated the field_collection_item resource (/field_collection_item/{field_collection_item}) with all the methods available (GET, POST, etc with authentication:basic_auth, cookie and…
3
votes
1 answer

Adding Drupal Field Collection element to a custom form

I'd like to add a Field Collection Item to my custom form. My form is a custom event registration (will save data to Event Registration node), and the field collection is available in Event Registration Content type. I tried many codes and tries…
danyg
  • 105
  • 1
  • 9
2
votes
3 answers

"Add more item button" to limited number of values

I have a scenario where in team leader enter his team members with their name and email id. I want to restrict team size to maximum of 10 team members. I am thinking of using Field Collection module to capture name and email values of team members.…
Amit
  • 342
  • 1
  • 13
2
votes
1 answer

How to create conditional Field group in Field collection using drupal 7

I have search on google but i did not find any solution for my requirement, so I am putting my question here for good answer. I have created a field collection in which i am having 4 fields 1) Title, 2) Image 3) Image Link and 4) Description. I want…
user3444989
2
votes
2 answers

how to create view of field collection in drupal 7

when i am creating a view of field collection they give error when we add fields in view error is that: An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path:…
Adi
  • 121
  • 5
1
vote
1 answer

Drupal 8 field collection – how to get raw value of a taxonomy field from field.html.twig?

I've got a node with a field collection, which contains a taxonomy field. I'd like to get the raw value or ID of this taxonomy field, to use in a conditional statement and provide different markup for different values. e.g.: {% set imageType =…
1
vote
1 answer

Hide a field collection field in an embedded form

I am trying to hide a field collection field that renders in an embedded form. This form renders on a few different nodes but only some nodes need all the fields, so I would like to hide them on ones that don't. Right now I am trying to do it vis…
1
vote
1 answer

Accessing array values of a field collection in a node with Drupal?

Please bare with a very recent user of Drupal. I want to create an array out of all examples of the string "url" on a Drupal site. I've used the method "field_get_items" previously to do something very similar, but I am now trying to access a…
user5415090
1
vote
1 answer

EntityMetadataWrapperException: Invalid data value given when setting file field

Cannot set file_field in field_collection Has node $order and field_collection called field_blueprints: "field_blueprints")…
alekssaff
  • 167
  • 2
  • 10
1
vote
1 answer

Drupal views UI, filter exposed, the date in collection field's content only by month and year (no day)

Is it possible to add an exposed filter with only month and years parameters ? When I add this filter, the user must choose the day, the month and the year. I don't want the "day option" The format of my date field in the content is : Month Year.…
1
vote
1 answer

Search API with Field Collections

Problem: I want to index my field collection items, so that they are searchable by the user. My Content Types are based of several Field-Collections, which are containing many text fields that should be searchable. The fields belonging to the Field…
Mark
  • 11
  • 2
1
vote
1 answer

Drupal 7 - Content type inside a content type - Like field collection

I´d like to create a content type called "contact" that will be share in other content types, like "client" and "prospect". When I create a new client, I´d like to be able to create, in the same form, new contacts for this client, like a field…
1
vote
2 answers

How do I prepopulate Field Collection fields in Drupal 7?

I have a content type that can contain unlimited instances of embedded field collection field_foo, each collection containing two fields: field_foo_bar and field_foo_baz. I want to modify the node creation form for this content type to pre-populate…
scronide
  • 12,012
  • 3
  • 28
  • 33
0
votes
0 answers

Validation errors with the date field

I am getting a validation error while saving a node for the date/time fields while the settings and data entry are normal. I spent more time in it and can't find the issue root cause The fields are in field collection, please check the attached…
Emad Samir Zaki
  • 393
  • 2
  • 10
1
2 3