Thanks for a great module! Unfortunately I think I have a case that breaks things:

1. Create a "Field Collection" that can take multiple values
2. Create a multiselect node reference as a field in this field collection
3. Create a node where the field collection has more than one value
4. Try and add nodes to each multiselect separately

The behavior is such that the second multiselect will trigger events in the first multiselect.

I'm assuming this has to do with how the JS is targeting the form elements, and that if the selectors are changing at the field collection level, not the multiselect level, that the multiselect fields end up with the same selectors and the module JS doesn't know about the change in parent?

I will try and troubleshoot further, but if anyone has ideas or patches I'd be happy to test!

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ndevelder created an issue. See original summary.

lyalyuk’s picture

I'm getting practically the same issue. Try this patch

Drumanuel’s picture

I have this problem too in version 7.x-1.13

I'm using a multiselect widget in a field collection in a paragraph. Only the first multiselect widget will work when multiple instances of this multiselect are on screen.

There seem to be multiple reports describing similar issues. I've tried several patches to no avail, so I wrote my own.

My approach is javascript based. With this patch the js-functions are not dependent on any select box id. A better fix would be to make the select box id's unique, now they are not.

Drumanuel’s picture

(uploaded file with 2 space indentation instead of 4)

Johan den Hollander’s picture

Emmanuel this patch does not apply cleanly. Had to do it manually.
I needed this to get multiselect working inside an inline entity form. Node inside node.
Patched code works only when I save the parent node. Saving the child node seperately inside the inline form does not work.