Dear Andrew,
Many thanks for your quick reply!
Hope I can bother you again and you can help with 2 other issues as well:
- When users fill in the registration and login form the text turns white on Safari browser. How can I fix this?
- I have found a way to change the texts of the error messages for the registration form using code below, which I found in another thread.
I also need to change the text of the login page (I only use an email, no password)
Is this possible by using the same method? And which handlers should I use?
/**
* Custom validation and error message for the E-mail Address field.
*/
add_action( 'um_custom_field_validation_user_email_details', 'um_custom_validate_user_email_details', 999, 3 );
function um_custom_validate_user_email_details( $key, $array, $args ) {
if ( $key == 'user_email' && isset( $args['user_email'] ) ) {
if ( isset( UM()->form()->errors['user_email'] ) ) {
unset( UM()->form()->errors['user_email'] );
}
if ( empty( $args['user_email'] ) ) {
UM()->form()->add_error( 'user_email', __( 'E-mail adres is verplicht', 'ultimate-member' ) );
} elseif ( ! is_email( $args['user_email'] ) ) {
UM()->form()->add_error( 'user_email', __( 'Het ingevoerde emailadres is geen geldig emailadres.', 'ultimate-member' ) );
} elseif ( email_exists( $args['user_email'] ) ) {
UM()->form()->add_error( 'user_email', __( 'Het ingevoerde emailadres is al eerder gebruikt. Je kunt hierboven inloggen.', 'ultimate-member' ) );
}
}
}