Problem/Motivation

My sendinblue_api handler is executed while the captcha of the webform is deliberately incorrect.

Steps to reproduce

1) Create a webform with a sendinblue_api handler, add a math captcha to the webform.
2) Send a submission with wrong captcha response.
3) The webform page will be reloaded with captcha error message but...
4) The sendinblue_api handler will be executed even though the captcha was false.

Can you help me? Why my handler is executed while the captcha is incorrect?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    1 hidden branch
  • master Comparechanges, plain diff MR !5

Comments

amdcm created an issue. See original summary.

amdcm’s picture

Issue summary: View changes

s3b0un3t made their first commit to this issue’s fork.

s3b0un3t’s picture

Status: Active » Needs review

Hi,

The submitContactForm() method is called both during postSave() and during validation if the form contains a phone field.
This method ends with the creation of a contact on Brevo, which should normally only happen at postSave().
I propose a workaround so as to no longer create contact upon validation.
This is not ideal; In my opinion, the design of this part of the module will have to be reworked.

Cheers,

amdcm’s picture

Hi,

Thanks for the solution!

Cheers,

  • a5149304 committed on master
    Issue #3476207 by s3b0un3t: Webform handler and captcha verification
    
finex’s picture

Status: Needs review » Fixed

Thanks for the MR. I've updated the code.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

finex’s picture