Hello,
I need to migrate to 8, no problem, but where is the Event Swticher?
Because Recaptcha doesnt work for me I need to implement hcaptcha because that works better for me, in all previous CF versions, way less spam. But I miss the Event Switcher.
Can you tell me how I can add the same functionality. For example I did this in previous versions:
<?php
$data = array(
'secret' => "SECRECTCODE",
'response' => $_POST['h-captcha-response']
);
die();
if($name == '' OR $email == '' OR $bericht == ''){
return "fail";
}
$verify = curl_init();
curl_setopt($verify, CURLOPT_URL, "https://hcaptcha.com/siteverify");
curl_setopt($verify, CURLOPT_POST, true);
curl_setopt($verify, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($verify, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($verify);
// var_dump($response);
$responseData = json_decode($response);
if($responseData->success) {
return "success";
}
else {
return "fail";
}
?>
So I can let the flow continue with success or return fail so I can stop the processing and not send email and save the data. But that is missing in 8. Can you explain how I get the same functionality?