If a flexifield content type contains a multiple value field, the javascript for the entire form submission gets broken.

Comments

psynaptic’s picture

I have tested this and you are correct. The JavaScript is broken for multi-value fields.

My use case was:

Title 1

  • Item 1
  • Item 2
  • Item 3
  • Item 4

Title 2

  • Item 1
  • Item 2
  • Item 3
  • Item 4

Title 3

  • Item 1
  • Item 2
  • Item 3
  • Item 4

I created a flexifield content type called "Specification" and used the following fields:

Fields:

  • Title - single value
  • Item(s) - multi-value

This was attached to another content type using Flexifield and allowed to be multi-value (unlimited) itself.

This breaks JS on the page, fieldsets don't collapse, everything JS-based seems to fail.

I also noticed that required fields are required on admin/content/node-type/[node-type]/fields/field_[field]. This is silly because you are forced to have a default value when you may not need one.

denislabonkink’s picture

subscribe.

JaceRider’s picture

subscribe

psynaptic’s picture

I ended up using content_multigroup.module which is part of CCK (just hidden by having no .info file).

xn2001’s picture

@psynaptic #4
Does it support multiple values field like freetagging?

xtfer’s picture

What appears to be occuring is the "Add another item" function for child fields within flexifields, adds a new flexifield parent field item if nothing is filled in, instead of adding more fields to the child.

weseze’s picture

I also noticed that the buttons normally get the class 'ahah-processed'. If you put u multi-value field in a flexifield the 'Add another item' buttons don't get that class added to them...

I think it has something to do with duplicate id's for html elements that causes ahah.js to crash and not process the page correctly.

If I find the time I will look in to this.

effulgentsia’s picture

Version: 6.x-1.x-dev » 6.x-1.0-alpha2
Status: Active » Fixed

This is now fixed in 6.x-1.0-alpha2. Note, however, that you need to enable the "Disable drag-and-drop for this field" checkbox on the configuration form for the flexifield field when it is containing a multivalued field that uses drag-and-drop and the "add another item" button inside.

nicholas.alipaz’s picture

6.x-1.0-alpha2 fixes the issue EXCEPT for when the fields are inside of a fieldset.

So if you have the exact same thing as what was described in post one but you have a Group around them, it breaks.
effulgentsia, I have sent you login info to test the issue I am describing.

nicholas.alipaz’s picture

Status: Fixed » Needs work

It is still broken when the flexifield is inside a field group. Can some one confirm this? I have reproduced it on two sites.

I also sent effulgentsia login info to try out what I have tried, but he never responded. Anyone else want to try it out then please contact me to see the issue.

nicholas.alipaz’s picture

bump? anyone out there?

effulgentsia’s picture

Status: Needs work » Fixed

I haven't had a chance yet to work on flexifield since releasing alpha2, but I'll resume that shortly. I opened a new issue (#399886: Multi-valued fields inside a field group inside a flexifield don't work) that I see as more of a problem with integration with fieldgroup rather than belonging on this thread. So I'm marking this thread as fixed, although if someone discovers a different bug with multi-valued fields inside a flexifield, feel free to change the status accordingly.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.