I have a content type (for example's sake, it's called Article) that that contains a vertical tab group that contains two vertical tabs. The first tab has a term reference field that uses the select list widget (I'll call this field article_type) along with several other fields. The article_type field is referencing a taxonomy list that contains three terms. The second tab has around twenty other fields that are displayed or hidden depending on the value of article_type.

When creating an Article, the field dependencies work fine. The article_type defaults to the first term in the taxonomy list which makes certain fields in the second tab disappear while displaying others. Going back to the first tab to change the value of article_type shows and hides the dependent fields in the second tab.

The problem arises when editing the node. When I go to edit the node, the second vertical tab contains all of the fields that should only be displayed when the first term in the select list is chosen plus the fields that should actually be displayed. To hide the fields that should already be hidden I need to:

  • Go to the first tab and change the value of article_type to the first item
  • Switch to the second tab where I now only see the fields that should be shown when the first term is selected (the fields that are actually in use are now hidden at this point)
  • Go back to the first tab and change article_type to the proper value
  • Switch back to the second tab

After all of that, the fields that should be shown are shown and everything else is hidden as it should be.

Is there a way to have the correct fields shown and hidden on page load? I have been looking through the javascript files but I am not sure where to begin.

Thank you!

Comments

peterpoe’s picture

Status: Active » Fixed

Closing ancient support requests.

Status: Fixed » Closed (fixed)

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