• Resolved Sommarzan

    (@sommarzan)


    If the Google reCaptcha is NOT checked, the user gets no red notification when submitting the form, saying that s/he must verify that s/he’s human.

    What happens is that on submit the user sees the thank you-page BUT nothing is actually posted, and neither the user or I get any notifications.

    (Yes, I have the latest update of the plugin.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Sommarzan

    (@sommarzan)

    OK, you will refer to using <?php echo usp_redirect_message(); ?> and tell me to add that to my template, but there must be a better and easier way, I hope.

    Anyway, I would like to change the text of the error message -> where can I do that?
    (I want it to say “If you see this error message, please ignore the success-message below… etc)

    EDIT: found it, it’s in the “user-submitted-posts/user-submitted-posts.php”.

    • This reply was modified 7 years, 3 months ago by Sommarzan.
    Thread Starter Sommarzan

    (@sommarzan)

    Next problem:
    when the form has been successfully submitted, the user still sees the “Go back”-link on the Thank you-page.
    (No error alerts, though, so that is correct.)

    Any idea on how not to show this link if form has been successfully submitted?

    EDIT: Found it myself ->
    on row 1200 in “user-submitted-posts/user-submitted-posts.php” you should remove “. $link”.

    if ($url && $enable) {

    if (isset($_GET[‘success’]) && $_GET[‘success’] == ‘1’) {

    $message = ‘<p id=”usp-success-message”>‘. $usp_options[‘success-message’] .’</p>’. $link;

    } else {

    $message = usp_error_message() . $link;

    }

    }

    • This reply was modified 7 years, 3 months ago by Sommarzan.
    • This reply was modified 7 years, 3 months ago by Sommarzan.
    Plugin Author Jeff Starr

    (@specialk)

    Glad to help:

    1) “If the Google reCaptcha is NOT checked, the user gets no red notification when submitting the form, saying that s/he must verify that s/he’s human.”

    It sounds like you are using the “Redirect URL” option, correct? If so, then that would explain it, as the error messages are not displayed automatically in that case (they need to be added via template tag, usp_redirect_message()).

    2) “OK, you will refer to using usp_redirect_message() and tell me to add that to my template, but there must be a better and easier way, I hope.”

    Correct, currently that is the correct method of adding success/error messages (when using the “Redirect URL” option).

    3) “Anyway, I would like to change the text of the error message -> where can I do that? (I want it to say If you see this error message, please ignore the success-message below… etc)”

    The free version of USP does not provide an option to customize specific error messages, but it is a feature of the Pro version. The free version, however, does provide a filter hook that would enable it with some custom code:

    usp_error_message

    So you or your developer could tap into that and modify whatever is necessary. Note that I do NOT recommend modifying any plugin core files directly; using the hook is a better way of doing it.

    4) “when the form has been successfully submitted, the user still sees the ‘Go back’ -link on the Thank you-page. (No error alerts, though, so that is correct.)”

    Correct, as explained above, the “Redirect URL” setting does not provide any error messages, so they will need to be added via the template tag, usp_redirect_message().

    I hope this helps, let me know if I can provide any further infos, glad to help however is possible.

    Plugin Author Jeff Starr

    (@specialk)

    Gonna go ahead and mark this topic as resolved to keep things organized. Feel free to post again if needed, I’m glad to help however possible. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem with reCaptcha’ is closed to new replies.