I have two modules loaded in same page and both modules need captcha. So I'm using this code but it is only showing in only one module.
If I remove captcha from module1 and keep captcha in module2 then captcha shows in module2 but if I add captcha to module1 too then it only shows in module1 but not in module2.
So, how can I use the code so that in both modules the captcha would be shown?
I've tried by renaming
$dispatcher->trigger('onInit','dynamic_recaptcha_1');
To this:
$dispatcher->trigger('onInit','dynamic_recaptcha_2');
But also no success.