Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple newsletter captchas on the same page do not work #30

Open
iranimij opened this issue Oct 19, 2023 · 5 comments
Open

Multiple newsletter captchas on the same page do not work #30

iranimij opened this issue Oct 19, 2023 · 5 comments

Comments

@iranimij
Copy link
Contributor

I have two newsletter forms on my home page, but it seems that the module does not support two or multiple captcha on the same page. since we have this below code for newsletters!

 document.querySelector('.newsletter .subscribe').append(document.getElementById('<?= /* @noEscape */ $block->getWidgetId() ?>'));

You can see we just send one widget ID to the template and because of that, we can not show multiple captchas.

@amenk
Copy link
Member

amenk commented Oct 19, 2023

Thanks for reporting and the analysis. Are you able to make a pull request?

@amenk amenk changed the title Multiple Captcha on the same page does not work. Multiple newsletter captchas on the same page do not work Nov 29, 2023
@amenk
Copy link
Member

amenk commented Dec 1, 2023

Fixed in 2.0.0

@amenk amenk closed this as completed Dec 1, 2023
@sprankhub
Copy link
Contributor

@amenk I don't believe this is fixed. We use version 2.0.3 on a site and have two newsletter signup forms on the homepage, from which only one has a FriendlyCaptcha widget. I think this needs to be re-opened.

@amenk amenk reopened this Mar 6, 2024
@amenk
Copy link
Member

amenk commented Mar 6, 2024

I think I closed this by accident.

One side note which partially might apply to this: It is not a good idea to have many FriendlyCaptcha widgets on the same page. We recently had a bug where we initialized ~ 60 such widgets on the same page for configurables with many variants and got chrome out of memory issues.

@sprankhub Two forms should not be a problem though .. but I am not sure if it leads to a nice layout with two newsletter signup forms on the same page? Did you consider something like one form where you can choose the newsletter to subscribe via ratio buttons, checkboxes or a dropdown list?

@sprankhub
Copy link
Contributor

I understand that 60 might lead to issues, but I also think two shouldn't be an issue :D

Not sure if I understand your idea. Currently, the design is just that way. Somewhere within the CMS page, you can sign up or in the footer 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants