This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This filter prevents the nonce field from being added after a CAPTCHA is successfully completed. This makes it easier to bypass a captcha.
Usage
add_filter( 'frm_should_include_captcha_nonce_field', '__return_false' );
Parameters
- None
Examples
Opt out of Captcha nonce
Users can bypass the CAPTCHA check by passing the nonce value. You can use this example to allow people to opt-out. Instead, users will need to always send a valid CAPTCHA token for each request that gets validated.
add_filter( 'frm_should_include_captcha_nonce_field', '__return_false' );
Notes:
- When you have a form with multiple pages, the CAPTCHA field validation will fail if the CAPTCHA field is not on the last page of the form.
- When switching between pages in a form with multiple pages, the CAPTCHA will be validated every time the page is loaded.