Would like to be able to use an entity reference select list as a control field. Currently, only entity reference autocomplete fields work.

My use case is a multi-user multi-blog website where an entity reference select list is used to select to which blog each post belongs. I'd like to use this field to control which set of tagging taxonomies are available for each post.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yseki’s picture

I did a simple patch to address this request.

yseki’s picture

yseki’s picture

Status: Active » Needs review

Status: Needs review » Needs work
NWOM’s picture

This works great. Only one issue that I found. After saving the node form the following is displayed after adding this patch:

Notice: Undefined index: #fields in _field_conditional_state_validate() (line 1046 of /var/aegir/platforms/panopoly-7.x-1.28/sites/hub/modules/field_conditional_state/field_conditional_state.module).
Warning: Invalid argument supplied for foreach() in _field_conditional_state_validate() (line 1046 of /var/aegir/platforms/panopoly-7.x-1.28/sites/hub/modules/field_conditional_state/field_conditional_state.module).
Notice: Undefined index: #fields in _field_conditional_state_validate() (line 1046 of /var/aegir/platforms/panopoly-7.x-1.28/sites/hub/modules/field_conditional_state/field_conditional_state.module).
Warning: Invalid argument supplied for foreach() in _field_conditional_state_validate() (line 1046 of /var/aegir/platforms/panopoly-7.x-1.28/sites/hub/modules/field_conditional_state/field_conditional_state.module).

I can't say for certain whether it is a bug in the module, or with this patch. Thanks for your work on this!

Edit: No longer occurs.

NWOM’s picture

Here is a reroll for the newest dev. It also has a fixed root path. Please review.