Hide the iconCaptcha div? #38
Replies: 1 comment 1 reply
-
Hi! This is not something that is available in IconCaptcha by default. There are 2 ways to get this working, with 1 solution not involving making changes to IconCaptcha. Solution 1. Store something in the session indicating that the captcha has already been solved and hide the captcha (as well as ignoring the captcha validation in your server script) after redirecting back to the form if that particular session data is present. See this StackOverflow post where they talk about this. (note that the post is about Google's captcha). Solution 2. With IconCaptcha, you can implement your own event/hook to automatically 'solve' the challenge after the user clicks on the captcha to load a challenge. Here you will also need to store some data in a session and validate whether the particular data is set. See the wiki for more information about this hook. The difference between these two ways is that solution 1 hides the captcha completely, and solution 2 still shows the captcha but autocompletes once a visitor initializes a challenge. |
Beta Was this translation helpful? Give feedback.
-
Hi,
is it possible to hide the div (and automatic solve the challenge) in a form?
In my case after submitting a contact form, the input is checked in the next step. If some fields have invalid content, the user gets the form again for updating these fields. Right now it is necessary to solve the captcha challenge in every step again. In the PHP code of the HTML page I check if the user already solved the challenge with:
$config=require $include_path.'captcha/captcha-config.php'; // Load the IconCaptcha configuration
$captcha=new IconCaptcha($config); // Create an instance of IconCaptcha
$validation=$captcha->validate($_POST); // Validate the captcha
if($validation->success()){....
but I don't know how to include an "autosolved" challenge into the HTML form, if test is positive...
Beta Was this translation helpful? Give feedback.
All reactions