Drupal Association members fund grants that make connections all over the world.
We came across an odd bug where for some forms the settings.clientsideValidation.forms is not populated with the form ID but settings.clientsideValidation.groups does gets filled.
We have been able to reproduce like this:
- Print a page with NO FORMS at all.
- Call a form with ctools modal
- The ajax call will bring the correct settings array but including settings.clientsideValidation.forms, but the global Drupal.settings.clientsideValidation.forms will not be filled (will be empty)
- The form will not validate
- Open a second ctools modal (can be a different one with a different form)
- Drupal.settings.clientsideValidation.forms will be filled this time, and the form will validate (again, can be a different form the second time)
The trick is that for some reason Drupal.settings.clientsideValidation.forms stays as an empty object the first time, but form then on it will be populated correctly.
In case anyone else is having issues, what we are doing is calling a render(drupal_get_form('_parahablar_fake_form')) for the pages were the modal might show up. That will initialise the Drupal.settings.clientsideValidation.forms and things will work.