Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As the project page says
The primary use case is the parent -> children one (product display -> products, order -> line items, etc.), where the child entities are never managed outside the parent form.
Existing entities can also be referenced.
field collection fields are the right candidates as they are never created, updated out side their host entity.
this is what i want to do:
Create content type:organization
create a field collection item Address cardinality unlimited hidden
create entity reference field and select inline entity form single value to add an address
Comment | File | Size | Author |
---|---|---|---|
#22 | ief-integration-1920048-12112435.patch | 4.42 KB | cgv |
|
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedField Collection would need to add IEF integration to their module.
Let's see what the Field Collection maintainers think.
Comment #2
kaizerking CreditAttribution: kaizerking commentedany one on this plz?
Comment #3
kaizerking CreditAttribution: kaizerking commentedit seems its a long way to support inline entity form :)
Comment #4
lcampanis CreditAttribution: lcampanis commentedIs there any update on this issue at all?
Anything in the pipeline maybe?
Similar issue is posted here: https://drupal.org/node/1934776
Comment #5
sk2013 CreditAttribution: sk2013 commented+1
Comment #6
jmuzz CreditAttribution: jmuzz commentedIt seems like it should be possible, though I don't believe anybody is currently working on it. Patches are welcome. Please stop posting in this issue to ask for updates or to 'bump' it. When there is an update it will be posted.
Comment #7
Marko B CreditAttribution: Marko B commentedI am wondering why do you even need inline entity form for field collection when something very similar is already there in FC module as default, what is the difference, they behave almost the same.
Comment #8
sk2013 CreditAttribution: sk2013 commented@Marko
Good Question.. But when we need multiple forms ( Add another) then inline forms are good. Other way of using for this scenario is to use Node Connect or Entity reference module to open the form using Reference Dialog module. This is somewhat not a nice approach in UI Perspective. Inline Entity provides a nice UI for better user experience.
Comment #9
jmuzz CreditAttribution: jmuzz commentedI don't understand the motivation behind this either. Why are inline entity forms better than the embedded field collection widget when we need multiple forms (Add another) ?
Comment #10
sk2013 CreditAttribution: sk2013 commentedIf the data is huge (like many fields) we can chunk it using inline form as it is saved independently and final save is done at the main node and hence a vast improvement on performance related to time it takes to save.
Comment #11
Marko B CreditAttribution: Marko B commentedYes, that does make sense.
Comment #12
mengi CreditAttribution: mengi commentedA use case I would implement would be to use field_collection, entity_reference and inline_entity_form modules together to create a simple workflow for content editors so they will be able to choose from a list of field collections.
This would be similar to what the paragraphs module is doing.
@ jmuzz,Marko B; your comments seem to imply that the use case I mentioned is possible with field_collections. Is it possible? What did I miss?
Comment #13
jmuzz CreditAttribution: jmuzz commented@mengi I don't think your use case is possible, I was just trying to understand the purpose of using inline entity forms instead of the inline forms that field collections provide. The problem is a field collection isn't just an entity, it is also an entry in a field in its host node. The machine name of that field is the bundle of the field collection, so you can't put field collections of different bundles into one field in their host.
Comment #14
imclean CreditAttribution: imclean commentedAn alternative way to achieve this would be to use ECK instead of field collection. Create a simple entity with 1 or more bundles and add the fields.
This entity can then be referenced by inline entity form as many times as you like, even within the same content type.
Comment #15
cgv CreditAttribution: cgv as a volunteer commentedI need same integration and I get the same error. I builded a patch that fix the problem, at least for basic functionality. But IEF have problems with validation when using it inside field collection field, so I builded another patch for that module (2853216)
Comment #16
cgv CreditAttribution: cgv as a volunteer commentedI added to the patch IEF compatibility when field collection item is deleted.
Comment #17
cgv CreditAttribution: cgv as a volunteer commentedI repair the last patch because I get errors when deleting field collection item.
Comment #18
cgv CreditAttribution: cgv as a volunteer commentedI added some variables to context so other modules can be aware of empty evaluation.
Comment #19
cgv CreditAttribution: cgv as a volunteer commentedIt is more usefull if the alter ief empty condition is done every time
Comment #20
cgv CreditAttribution: cgv as a volunteer commentedAdd validation to prevent php warnings
Comment #22
cgv CreditAttribution: cgv as a volunteer commentedSubmit inline form per field