Handling empty recaptcha
-
I got recaptcha to work, but when submitting an empty captcha I want to reload page and add error text next to captcha rather than display an ugly error page.
Currently trying:if (true == $response["success"]) { return $commentdata; } else { header('location:['.get_permalink( $commentdata['comment_post_ID'] ).']'); /*refreshing page*/
Then I’ll retrieve ‘comment_author’ and ‘comment_content’ from $commentdata and add the values to corresponding fields so user doesn’t have to enter the comment again.
But I keep receiving duplicate comment error from wp-comments-post.php.How can I solve this issue? Or is there an easier way? Keeping comment_content value is important.
- The topic ‘Handling empty recaptcha’ is closed to new replies.