Support » Plugin: Ultimate Member – User Profile, User Registration, Login & Membership Plugin » Required field or too short PW message does not show

  • Resolved ohliza

    (@ohliza)


    I created a registration form. It works. But if the user leaves a required field blank or chooses a password that doesn’t meet the requirements, the error message saying so is too far down the screen for the user to see, so they think they registered, but they did not.

    How can I make it clear that the registration is NOT complete until they scroll down and fix a field they left blank, or in this case, choose a more complex PW?

    Something prominent at the top on submit like “There’s an issue with your registration please scroll down and fix that and submit the form again” or similar?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @ohliza

    You can try this code snippets below:

    add_action("um_before_form","um_custom_error_message_before_form", 9, 1 );
    function um_custom_error_message_before_form( $args ){
       
       if ( UM()->form()->count_errors() > 0 ) {
    	_e("There’s an issue with your registration please scroll down and fix that and submit the form again","ultimate-member");	
       }
    
    }

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @ohliza

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂

    Regards,

    Thread Starter ohliza

    (@ohliza)

    That worked, thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.