- Issue created by @mortim07
- Merge request !644Move attachment of Drupal states library and element states from prepare to... → (Open) created by mortim07
When conditions are attached to a date field, they don't work when the controlling field is on another page.
There is code within Drupal\webform\Plugin\WebformElement\DateBase::prepare that attaches Drupal states library and element attributes using the #states prop. This function is run before Drupal\webform\WebformSubmissionConditionsValidator handler class which determines the validity of the states and whether to unset them or not.
Move the logic to the #after_build callback of the element.
Active
6.3
Code