I have a module that takes my entity's fields and adds them to it's own form using `hook_field_attach_form()`.

Can anyone shed some light on whether or not it would be possible to support `hook_field_attach_form()` for field dependencies?

I gave it a shot, and was able to hide fields, but not show them with behaviors.

The modules I'm attempting to use with this are registration and commerce_registration.

Comments

Title:Support for hook_field_attach_form()support for markup fields
StatusFileSize
new634 bytes

I did some debugging and discovered that the issue stems from the entity and bundle information being located at delta 0 of the field rather than in the field root level.

This patch allows markup fields to be evaluated using the entity and bundle information provided at delta 0 of the field.

See #1787046: Setting #field_parents for the conditional fields module for a patch to set the correct value for #field_parents in the field if using Commerce Registration.

Status:Active» Needs review

Patch complete. Setting status to "needs review";

Component:Code» Compatibility w/ other modules

Changing component to "Compatibility w/ other modules" since this applies to the Markup module

This patch along with the patch from comment #42 http://drupal.org/files/conditional_fields_fixed_multiple_field_collecti... at http://drupal.org/node/1464950 has allowed conditional fields to work with Commerce Registration and Field Collections here.

Status:Needs review» Reviewed & tested by the community

#1 works for me, thanks!

Issue summary:View changes

Updated issue summary.