Created
March 16, 2020 15:34
-
-
Save champsupertramp/51e83a64e2de1920ff2b88b66691a49f to your computer and use it in GitHub Desktop.
Ultimate Member - Add error message above profile/register form for long forms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action("um_before_form","um_custom_error_message_before_form", 9, 1 ); | |
function um_custom_error_message_before_form( $args ){ | |
if( $args['form_id'] != 123 ) return; // apply to form ID 123 | |
if ( UM()->form()->count_errors() > 0 ) { | |
_e("There are field errors below","ultimate-member"); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment