I try to implement google recaptcha v2 using isset( $_POST[‘submitted’])) method on form submittion. But it’s not working because of hidden fields & wp_nonce_field(). And form submitted without checking isset function.
Below two line of code is for hidden fields and wp_nonce_field() function.
<input type=”hidden” name=”action” value=”<?php echo esc_attr( $action ); ?
<?php wp_nonce_field( $action ); ?>
Below code is for Form submit button with name “submitted”.
<button type=”submit” id=”submitted” name=”submitted” value=”submitted”>>
I try to use,
//code for isset true, But not working
I also tried, if(($_SERVER[‘REQUEST_METHOD’] == ‘POST’)) method, But is also not working.
Please guide me to solve this issue.