I created a custom registration form on my site, but every time the registration is approved, a pop-up is displayed. How can I get rid of it?
Note
The approval of my SignUp is set to “Anyone”.

export function registerNow_click(event) {
let firstName = $w( ‘#firstName’ ).value;
let lastName = $w( ‘#lastName’ ).value;
let phoneNumber = $w( ‘#phoneNumber’ ).value;
let email = $w( ‘#email’ ).value;
let password = $w( ‘#password’ ).value;
let confirmPassword = $w( ‘#confirmPassword’ ).value;
let agreeWithTheTermsAndCondition = $w( ‘#agreeWithTheTermsAndCondition’ ).valid;
if (agreeWithTheTermsAndCondition == false ) {
$w( ‘#errorMessage’ ).text = “You must agree with the terms and conditions.”
$w( ‘#errorMessage’ ).show();
setTimeout(() => {
$w( ‘#errorMessage’ ).hide();
}, 2500 );
//Check if password match
} else if (password !== confirmPassword) {
$w( ‘#errorMessage’ ).text = “Password does not match.”
$w( ‘#errorMessage’ ).show();
setTimeout(() => {
$w( ‘#errorMessage’ ).hide();
}, 2500 );
//Check if phone number is valid
} else if ($w( ‘#phoneNumber’ ).valid == false ) {
$w( ‘#phoneNumber’ ).placeholder = “Invalid format” ;
//Check if email is valid
} else if ($w( ‘#email’ ).valid == false ) {
$w( ‘#email’ ).placeholder = “Invalid Email” ;
} **else** {
wixUsers.register(email, password, {
contactInfo: {
“firstName” : firstName,
“lastName” : lastName,
“phones” : [phoneNumber]
}
})
.then((result) => {
let resultStatus = result.status;
wixLocation.to( ‘/home’ );
})
. **catch** ((err) => {
let errorMessage = err.split( “:” )[ 0 ];
$w( ‘#errorMessage’ ).text = errorMessage;
$w( ‘#errorMessage’ ).show();
setTimeout(() => {
$w( ‘#errorMessage’ ).hide();
}, 2500 );
})
}
}
Advance thanks.
