How to make an additional field in the comments, for example, on the left side will be the question: "How much is 1 + 1?" and a slightly more correct field for entering an answer, if the user answers 1, then the comment after clicking on the standard "send comment" button is not added, if 2, then the comment is added?
I understand the process itself. Create a data entry field:
Сколько будет 1+1? <input type="text" name="name">
Then we write the condition:
<? if( $_POST['name'] == '2' ){ echo '<input class="floatl" name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" /> <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />'; } else{ echo '<h1>Не правильно!</h1>'; } ?>
In this case, a button should appear to add a comment if the number is entered correctly, but something is wrong here, because button does not appear.