I'm using conditional fields to make a dependency between an options field with radio buttons and multiple markup fields with descriptions of the options. When it works, the relevant markup field appears when an option is selected. Only one markup field is visible at a time.

The conditional fields module won't evaluate dependencies if #field_parents is left as an empty array in commerce_registration_information_checkout_form().

The conditional fields module also needs to be patched for this to work because there is no information about the entity or bundle in the form. I have submitted a patch in the conditional fields issue queue: #1786232: support for markup fields

I will provide the patch for this issue shortly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arosboro’s picture

Here is the patch

Status: Needs review » Needs work
jpontani’s picture

Version: 7.x-3.x-dev » 7.x-2.x-dev
Status: Needs work » Fixed

Committed to latest dev.

Status: Fixed » Closed (fixed)

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

tmsimont’s picture

Status: Closed (fixed) » Active

This doesn't seem to address a situation where there are 2 registrations on the checkout pane. This will only fix the problem for the first of the 2. The second registration on the pane (if there are 2 in the cart) fails to work with conditional fields.

tmsimont’s picture

tmsimont’s picture

Status: Active » Closed (fixed)

Nevermind about #5 -- the patch in #6 replaces the need for the patch here in #1, and the issue with multiple registrations is related to a different issue in Conditional Fields: #1803568: Multiple calls to field_attach_form() causes conflicts