I am working on a shop that make use of conditional fields for its product creation form. In this case the form allows the user to select whether the product being created has fabrics or not: if it does, it removes the requirement of the default field , hides ir and then shows two new fields and makes them required,

In the Bulk Creation page these fields show as checkboxes, and of course, no conditional options, thus the creation logic breaks down.

I was wondering if there is any plans (though I imagine it would probably be very complicated) to implement or somehow tie in the Conditional Fields module into Bulk Creation or if there are any hints or ideas as of how this could be handled.

Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sven.lauer’s picture

Title: Confitional Fields » Conditional Fields

Hm, I don't know the internals of Conditional Fields, so it is hard to say how complicated this would be to achieve ... I suspect that a truly general solution might be complicated, but maybe a site-specific glue module might work.

Do I understand correctly that what you want to happen on the BPC form is:

- User selects "this product has fabric options".
- New "Combination fields" are shown and made required.
- A "static field" is hidden (and made non-required).

?

I suppose that it is not feasible to simply have a separate product type that has (required) fabric options? Which of course would just be a workaround, I can see how it would be very sweet to have everything in one product type ...

3rdLOF’s picture

Yeah, pretty much how you desribe it. I can see how this will eventually be asked again because many people use Conditional Fields to control how content is submitted.

What I did as a simple work around for now is to remove the requirement element, which is really the main problem. That solves the ability to submit it at all.

I also see issues with Fieldgroups and the rendering of Boolean Single Choice checkboxes:

  • Fileldgroups do not show up
  • Boolean single choice checkboxes show up as a two checkboxes without the boolean logic and it does not respect the use of the label: "Use field label instead of the "On value" as label"

Workaround for the fieldgroups is to simply remove them. In my case this was no really a big deal. The checkox, however, is a major one because it does break the logic and it is a core field element.

See attached images.

May I suggest you guys add some info on the project's main page reminding people about the Conditional Fields and Fieldgroups incompability? That may help some folks to avoid redoing forms or creating a product type that uses these modules.

3rdLOF’s picture

[edited]

Upss....double post. My bad. Edited.