0

Problem: When users don't fulfill criteria in a registration form, an error message shows up (e.g., "Password must be 12 characters long"), but the page reloads too quickly which doesn't allow the user to properly read the whole message.

Solution needed: I've attempted to delay the script causing the page reload by adding a setTimeout to delay the page reload, but with no success. Any ideas?

Context: The registration form in question is located at https://mycareinsite.com, which I've created using Wordpress/Custom Code/Plugins.

I've attempted to follow the solution outlined at the following thread, but to no avail: JS - location reload with delay after function executed

function clean_login_url_cleaner( $url ) {
    $query_args = array(
        'authentication',
        'updated',
        'created',
        'sent',
        'restore'
    );
    return esc_url( remove_query_arg( $query_args, $url ) );
}
deHaar
  • 17,687
  • 10
  • 38
  • 51
  • As far as I can tell, the form is sent, and the server's reply, a new page, contains an error message. The error message however has a timer attached that hides it after two seconds or so. So same problem but different cause. Just FYI. I'm going to look at the code now. –  Jul 10 '19 at 20:59
  • What's the name of the plugin you used for the registration form? –  Jul 10 '19 at 21:26

0 Answers0