Hi, I’m trying to create a custom sign up page and I’m using this code:
import wixUsers from ‘wix-users’;
import wixLocation from ‘wix-location’;
//import wixWindow from ‘wix-window’;
$w.onReady( function () {
$w(‘#submit’).onClick( () => {
const key = $w(‘#key’).value;
if (key === “ZranZ19”){
// register as member using form data
wixUsers.register($w(‘#email’).value, $w(‘#password’).value, {
“contactInfo”: {
“firstName”: $w(‘#firstName’).value,
“lastName”: $w(‘#lastName’).value,
“email”: $w(‘#email’).value,
“phone”: $w(‘#phone’).value,
“Organizace”: $w(‘#organizace’).value
}
});
wixLocation.to(“https://dvfilmstudio.wixsite.com/zr001”);
}
});
});
My problem is that when I add the wixLocation.tol line, the registration doesn’t work. Can anybody guess where the problem may be or how to solve redirecting after submitting the form differently?
Thanks a lot!