I can alter the value of a dropdown via jQuery. This dropdown acts as a controlling field. How can i change the visibility of the controlled fields, when its value is changed by jQuery?

Comments

peterpoe’s picture

Component: Miscellaneous » Javascript
Status: Active » Fixed

Better late than never:
There are three functions involved in conditional_fields.js:
Drupal.ConditionalFields.fieldChange is fired when a form event occurs (change or keydown). It gathers the field values using Drupal.ConditionalFields.findValues, finds the wrapper's id and passes them to Drupal.ConditionalFields.switchField. Depending on what you want to achieve, you might want to bind fieldChange to an event, or call manually switchField with the right parameters on your custom event.

Status: Fixed » Closed (fixed)

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