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

Opt-In checkbox not working #8

Closed
Aero91 opened this issue Oct 17, 2023 · 5 comments · Fixed by #12
Closed

Opt-In checkbox not working #8

Aero91 opened this issue Oct 17, 2023 · 5 comments · Fixed by #12

Comments

@Aero91
Copy link

Aero91 commented Oct 17, 2023

Hi,
E-Mail for DOI is sent, even if the checkbox is not active.

TYPO3 11.5.32
Extension 2.0.0

@80Quattro
Copy link
Contributor

Seems like AbstractFinisher->isEnabled() method (BrevoFinisher line 109) doesn't work as expected. I've made a PR.

@h3nn3s
Copy link
Contributor

h3nn3s commented May 22, 2024

Hi,

I think this change is not working as expected.

"this->isEnabled()" checks renderingOptions.enabled = true which is the core was to enable or disable finishers
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/9.4/Feature-85080-AddPropertyDisableFormElementsAndFinishers.html

Your solutions requires me to set options.enabled = true

@georgringer I am wrong on this issue or can this change reverted and a new version released?
This breaks old behavior.

BR Henrik

@georgringer georgringer reopened this May 22, 2024
georgringer added a commit that referenced this issue May 22, 2024
@Aero91
Copy link
Author

Aero91 commented Aug 19, 2024

Unfortunately, I am still experiencing the issue. Even though the user does not check the checkbox, an email is still being sent by Brevo. Do I need to manually adjust something in the form configuration, or should the configuration in the form GUI be sufficient? My current configuration looks like this:

options:
enabled: '{nl-checkbox}'
firstName: '{name}'
lastName: '{lastname}'
email: '{email}'
additionalListIds: ''
tracking: contact-form
identifier: Brevo

@h3nn3s
Copy link
Contributor

h3nn3s commented Sep 10, 2024

@Aero91
I think the code is working correctly - but your config (and the one from the example form of this extension) is not correct.
The enable-flag must be nested under options.renderingOptions.enabled = '{nl-checkbox}'
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/9.4/Feature-85080-AddPropertyDisableFormElementsAndFinishers.html

I investigated on this, because we had a similar issue...

HTH Henrik

@h3nn3s
Copy link
Contributor

h3nn3s commented Sep 10, 2024

see PR #15

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

Successfully merging a pull request may close this issue.

4 participants