Hi,

I am using conditional_fields and field_groups for my content forms, I have found what seems to be a bug when the conditions are set in a certain way..

In my content type form, I have 3 List (text) fields, they represent different department sub categories, based on the list selections the form fields and field_group inline fields will fade in/out.

The issue seems to be that when I have more than one condition set using different List (text) values, my images are not being saved when I attach them in the form (via field_settings image field).

If you are wondering why I have multiple List (text) fields, this is because if a user selects their Department as "Human Resources (hr)" a list (text) field named "What are you uploading" shows up with list values specific to HR.

So I have a few list (text) fields called "What are you uploading" that get shown/hidden depending on department selection.

As soon as I add more than one of such dependency, saving the image attachment in my field_group breaks.

Attached is a screenshot that I hope will help in identifying my problem..

Any help would be appreciated!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

c3rberus’s picture

Assigned: c3rberus » Unassigned
c3rberus’s picture

I should add, during my testing I noticed that this only applies if my "image" field is found in field_group.

If the "image" field is in the main content type form, it works.. though I am trying to leverage field_group so to keep the amount of fields in the content type form to a minimum.

I wonder if this is more of a field_group bug than conditional_fields module?

timfletcher’s picture

Issue summary: View changes

I've run into a similar issue, I've got a large Content Type form I built using Field Collections, each of which is conditionally shown/hidden using Conditional Fields.

When Conditional Fields is enabled and configured and the form is submitted:

  1. All text-field data is successfully saved regardless of the field's visibility to the User when they save the node
  2. Select option fields are purged if contained within a Field Collection
  3. Only the first Field collection will display when the node is viewed, regardless of settings or field order

After disabling Conditional Fields:

  1. All field data is saved successfully
  2. All fields display correctly when the node is viewed

Technically I could get around this either rebuilding the form without Field Collections, or writing some JavaScript to handle the conditional show/hide functionality, but neither is ideal given the size of the form.

I got the idea to try disabling Conditional Fields from @arzuga, who seems to have run into something similar too, but with the Entity Registration module. Could be related?