I’ve already tried different approaches but still can’t make it to work.
What’s your solution?
<?php
$js = <<<JAVASCRIPT
jQuery('#{$form->getId()}').on("beforeValidate", function(event, messages, deferreds) {
alert('This alert wants to show up. Desperately.');
});
JAVASCRIPT;
$this->registerJs($js);