- π©πͺGermany CHiLi.HH
The patch from #91 works as far as #states are usable for vertical tabs. However, with Drupal v10.4.0 I currently encounter the problem, that the initial state of impacted tabs is not set correctly. In other words, in my form I have a checkbox that should determine if a tab and it's corresponding menu entry should be visible as long as the checkbox is actually checked. If the initial state of the checkbox is unchecked, the corresponding tab and it's menu entry still get displayed nevertheless until I uncheck and re-check the controlling checkbox.
It seems to me as if only the visibility state of the tab and its menu entry is set wrong for the initial state and it's not a fault of the controlling checkbox/form element. Why do I think that? Because in the tab that is to be conditionally displayed there are form elements contained that should receive a "required" flag when the same checkbox that is controlling the tab visibility is checked - and this works. In the initial state (so, when the tab itself is wrongly displayed) the dependant form elements within that tab are NOT required and only get required once the checkbox is actually ticked.
Unfortunately I was not able to spot the code fragment that's responsible for the state initialization and therefore can't provide an updated patch. :-(