Custom Captcha not selectable

Hi,

I created a custom captcha class which has no real implementation yet:

#[Package('storefront')]
class TestCaptcha extends AbstractCaptcha
{
    final public const CAPTCHA_NAME = 'testCaptcha';

    public function isValid(Request $request, array $captchaConfig): bool
    {
        return true;
    }

    public function getName(): string
    {
        return self::CAPTCHA_NAME;
    }
}

Before implementing the Captcha itself I want to be able to select it in the administration. It does show up in the select box, but I am unable to select it:

Clicking on „Test Captcha“ does not do anything. The other Captcha implementations can be selected however.

I read Add custom captcha | Shopware Documentation which did not help.

What do I have to do to make the Captcha selectable?

2 „Gefällt mir“

Did you try in the python way ?

You have to add a migration file to extend the system config entry with the key „core.basicInformation.activeCaptchasV2“ with your captcha.

If your captcha need any configuration settings you have to override the template of the sw-settings-captcha-select-v2 admin component to implemet your config fields.