Trying to add Recaptcha to Email share button
-
Hi
I am trying to add a Recaptcha to the email share button form. I have added the Recaptcha constants to wp-config.php
I followed this https://jetpack.com/blog/recaptcha-email-sharing-button/
When I click on the email icon, the form appears but no Recaptcha..check screenshot:
https://ibb.co/z7NqPyV
Basically, it is a form from the Sharedaddy module of Jetpack.
https://github.com/dlech/jetpack-sharing/blob/lechnology/sharedaddy/sharing-sources.php<form action="<?php echo esc_url( $_SERVER['REQUEST_URI'] ); ?>" method="post"> <label for="target_email"><?php _e( 'Send to Email Address', 'jetpack-sharing' ) // E-1 ?></label> <input type="email" name="target_email" id="target_email" value="" /> <?php if ( is_user_logged_in() ) : ?> <input type="hidden" name="source_name" value="<?php echo esc_attr( $current_user->display_name ); ?>" /> <input type="hidden" name="source_email" value="<?php echo esc_attr( $current_user->user_email ); ?>" /> <?php else : ?> <label for="source_name"><?php _e( 'Your Name', 'jetpack-sharing' ) // E-1 ?></label> <input type="text" name="source_name" id="source_name" value="" /> <label for="source_email"><?php _e( 'Your Email Address', 'jetpack-sharing' ) // E-1 ?></label> <input type="email" name="source_email" id="source_email" value="" /> <?php endif; ?> <?php do_action( 'sharing_email_dialog', 'jetpack-sharing' ); // E-1 ?> <img style="float: right; display: none" class="loading" src="<?php echo apply_filters( 'jetpack_static_url', plugin_dir_url( __FILE__ ) . 'images/loading.gif' ); ?>" alt="loading" width="16" height="16" /> <input type="submit" value="<?php _e( 'Send Email', 'jetpack-sharing' ); // E-1 ?>" class="sharing_send" /> <a href="#cancel" class="sharing_cancel"><?php _e( 'Cancel', 'jetpack-sharing' ); // E-1?></a> <div class="errors errors-1" style="display: none;"> <?php _e( 'Post was not sent - check your email addresses!', 'jetpack-sharing' ); // E-1 ?> </div> <div class="errors errors-2" style="display: none;"> <?php _e( 'Email check failed, please try again', 'jetpack-sharing' ); // E-1 ?> </div> <div class="errors errors-3" style="display: none;"> <?php _e( 'Sorry, your blog cannot share posts by email.', 'jetpack-sharing' ); // E-1 ?> </div> </form>
Can you please help me with how I can add a recaptcha?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Trying to add Recaptcha to Email share button’ is closed to new replies.