reCatcha on forms
Support › MB Frontend Submission › reCatcha on forms
- This topic has 1 reply, 2 voices, and was last updated 7 months, 3 weeks ago by
Peter.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
August 22, 2024 at 3:40 PM #46199
Yasmine
ParticipantI added my key and password into the shortcode on a custom frontend register form.
[mb_user_profile_register email_as_username="true" label_submit="Create account" confirmation="A verification link was sent to your email.<br><br>
If you don't see it, check your junk folder." password_strength="false" recaptcha_key="my-correct-key-was-here" recaptcha_secret="and-correct-secret-was-here"]But every submit I get 'Invalid captcha token'
<?php //Rego form function registration_frontend_fields($fields) { $first_fields = [ [ 'name' => __( 'Full name', 'your-text-domain' ), 'id' => 'name_field', 'type' => 'text', 'class' => 'full_name_field', 'desc' => 'enter your full name. This field is required', 'placeholder' => __( 'Enter your full name', 'your-text-domain' ), 'tabindex'=> '-1', ], [ 'type' => 'custom_html', 'std' => __( 'Email', 'your-text-domain' ), 'class' => 'signup-class', ], [ 'name' => __( 'Email', 'mb-user-profile' ), 'id' => 'user_email', 'type' => 'email', 'placeholder' => __( 'Work email', 'your-text-domain' ), 'required' => 1, 'columns' => 12, ], [ 'type' => 'custom_html', 'std' => __( 'Which describes you best?', 'your-text-domain' ), 'class' => 'signup-class', ], [ 'name' => __( 'User role', 'your-text-domain' ), 'id' => 'selected_user_role', 'type' => 'select_advanced', 'options' => [ 'practitioner' => __( 'Professional', 'your-text-domain' ), 'contributor' => __( 'Academic', 'your-text-domain' ), 'researchpro' => __( 'Researcher (Non-academic)', 'your-text-domain' ), // 'student' => __( 'Student', 'your-text-domain' ), ], 'inline' => false, 'required' => true, ], [ 'name' => __( 'Terms of service', 'your-text-domain' ), 'id' => 'user_terms_agreement', 'type' => 'checkbox', 'required' => true, ], ]; $fields = array_merge( $first_fields); return $fields; }; add_filter( 'rwmb_profile_register_fields', 'registration_frontend_fields'); ?>
August 23, 2024 at 3:27 PM #46218Peter
ModeratorHello Yasmine,
Can you share the registration page URL? I will try to register a user and see how it goes. Also, do you use another plugin or theme that also uses Google reCaptcha? It could be an issue when two keys are on the same page.
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.