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.
By roric32 on
Ajax does not work in forms. I'm using Ajax callbacks in a form and they were working fine until I moved a few things around in some template files. The drupalSettings variable is getting set and shows up when I view source, but the ajax key is missing and I can't for the life of me figure out why it's not getting called.
Things I've tried:
theme.info.yml has the follow dependencies:
dependencies:
- core/jquery
- core/drupalSettings
- core/drupal.ajax
- core/drupal
The library in the theme has those same dependencies.
Is there somewhere else I need to add a dependency?