Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After submit there is no value reported for the second select 'color' added by the ajax callback.
Suggestion: Move the form element 'color' to buildForm(). Similar to the D7 version where the second dropdown is also in form build and the ajax callback is empty.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2774601-2.patch | 6.05 KB | pfrenssen |
|
Comments
Comment #2
pfrenssenThis example is indeed broken. I lost some time today because it wasn't immediately clear that my form wasn't working through a mistake of my own but because the example isn't working.
I have fixed the example and have also updated it so it follows correct coding standards and Drupal best practices.
Comment #4
Mile23This really needs a functional javascript test, but let's make that a follow-up since this is a bug.
Thanks!