What this solution does
The Captcha All-in-one module for 1C-Bitrix replaces the default image captcha with widgets from external providers. Supported providers include Yandex SmartCaptcha, Google reCAPTCHA v2, hCaptcha, and dCaptcha.
How it works
The default Bitrix validation remains active. The module replaces the captcha HTML markup with the provider's widget. Upon form submission, the token is verified on the provider's server, and the resulting code is inserted into the captcha_word variable. The standard Bitrix component then validates this code using its usual logic and allows the form to proceed. This approach ensures compatibility with all pages using the default captcha without requiring component code modifications. Forms without the default captcha are left untouched.
Capabilities
Site-specific configuration settings. Access to settings is controlled by user groups.
Selection of the provider and entry of unique API keys for each.
Yandex SmartCaptcha parameters: test mode, WebView, invisible captcha, widget position, notification block hiding, and custom notification text.
Theme and widget size options for reCAPTCHA and hCaptcha.
Layout parameters: CSS class for the captcha container, fixed block height (to preserve layouts designed for a 180×40 image), and hiding of unnecessary elements within the block.
The module supports strict and soft modes. In strict mode, forms are rejected if the token is missing. In soft mode, if the widget fails to load, the standard Bitrix captcha is returned.
Custom text messages for 'captcha not passed' and 'verification server not responding' replace the default Bitrix messages across all modules and components. The list of keys can be extended with texts from your own template. A URL mask can be configured to exclude specific addresses from message replacement.
In the event of a verification server failure, the module implements a pause to prevent every form submission from waiting for a timeout. A direct connection test with the provider's service is available in the settings. The module correctly handles forms submitted via AJAX.
Requirements:
PHP 8.2 or higher;
Bitrix main module v24.0.0 or higher;
Standard captcha enabled in forms requiring protection;
Provider keys (issued in the provider's console; the module does not contain its own keys).
Compatibility:
The module is not designed to operate simultaneously with other captcha modules, as they modify the same markup. The settings page displays a warning if such modules are detected.
Logging:
Verification errors are written to the Bitrix event log. The event type is 'Captcha: verification error' (ALGOMIX_SMARTCAPTCHA_ERROR).
General iT can take care of implementing “Captcha All-in-one (Captcha All-in-one)”, including installation, configuration and result verification.