If you run a WordPress site with Fluent Forms, you may want to make the form submission experience smoother for your logged-in users by removing captcha verification. This tutorial will show you how to conditionally remove captcha fields (Turnstile, reCAPTCHA, or hCAPTCHA) from your Fluent Forms when a user is logged in.
This approach improves user experience for your registered members whilst maintaining security for guest users – a perfect balance for membership sites or online communities.
Why Remove Captcha for Logged-in Users?
Before diving into the code, let’s understand why this is useful:
- Improved user experience for registered members
- Faster form submissions for your loyal users
- Reduced friction in the user journey
- Maintained security where it matters most (anonymous submissions)
Let’s look at how to implement this functionality.
The Solution
The solution involves two key functions:
- A function to remove the captcha field from the form rendering
- A function to disable the captcha verification process
Here’s the code to remove Turnstile captcha for logged-in users: