Howdy,

I have a content type that uses multiple field collections (http://drupal.org/project/field_collection) to create a page. Since each field collection is composed of a title, a long text description and one image, this can make the edit screen long and cluttered.

So I wanted to use the multiple value widget to simplify the edit screen, but it does not work. It would be great if support for Field Collections could be added to this module.

Thank you!

Comments

adam_b’s picture

+1

chi’s picture

Title: Add support for multiple Field Collections » The module doesn't work with multiple Field Collections
Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Component: Miscellaneous » Code
Category: feature » bug
Priority: Normal » Major
Status: Active » Closed (duplicate)

Field collection module overrides some important properties in widget form. I didn't find any way to get instance settings from theme_field_multiple_value_form(). Feel free to reopen the issue if you find workaround for this.

However, I think it should be fixed in Field collection module.
Please, try the patch from this issue: #2001682: field_collection_field_widget_form() should not override default $element properties.

ilfelice’s picture

Chi, thank you! I will follow up on the Field Collection issue that you added.

MO-2’s picture

Has anyone been able to get this working?

likewhoa’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes
Status: Closed (duplicate) » Active

The patch suggested doesn't seem to work as expected.

keesje’s picture

experienced a maybe-related issue. "settings.mvw" was undefined when using media fields in fieldcollections, breaking JS execution. This happened only on ajax reloads of the media fields in this case. Adding an "if" wrapper to multiple_value_widget behavior in multiple_value_widget.js fixed this. Might be a workaround for the underlying problem which is unclear to me.

Drupal.behaviors.multiple_value_widget = {
  attach: function (context, settings) {
    if(settings.mvw){
      $.each(settings.mvw,function(id, type) {
        attachPlugin(context, id, type);
      })
    }
  }
};