Custom Signup Page with Redirect after Signup

Hello Mike,

You almost had it, but it was on the wrong line,

Here is how it should look:

$w(‘#SignupRegisterButton’).onClick(() => {
wixUsers.register($w(‘#SignupEmailInput’).value, $w(‘#SignupPasswordInput’).value, {
“contactInfo”: {
“firstName”: $w(‘#SignupFirstNameInput’).value,
“lastName”: $w(‘#SignupLastNameInput’).value,
“FirstName”: $w(‘#SignupFirstNameInput’).value,
“LastName”: $w(‘#SignupLastNameInput’).value,
“username”: $w(‘#SignupUsernameInput’).value,
“dob”: $w(‘#SignupDOBDatePicker’).value,
“password”: $w(‘#SignupPasswordInput’).value,
“country”: $w(‘#SignupCountryDropdown’).value
}
}).then(() => {
//Everything went good, user was registered, now going to redirect
console.log(‘user registered successfully’);
wixLocation.to(‘https://google.com’);
}).catch((err) => {
//If there is an error it will not redirect, it will console.log the error
console.log(${err}: Error)
})
});

Hope this helps,
Majd