I want to redirect my button to 3 different pages depending on the codes before. This works fine only one of the codes is a dynamic page and this part does not work. What do I do wrong in the link to the dynamic page with case ‘Klant’?
}, $w ( “#radioGroup1” ). selectedIndex )
. then (() => {
const selectedValue = $w ( “#radioGroup1” ). value ;
let targetPath = ‘/’ ;
switch ( selectedValue ){
case ‘Dronepiloot’ :
targetPath += ‘/dronepiloot-area’ ;
break ;
case ‘Klant’ :
targetPath += ‘/Opdrachtgever/registratie-opdrachtgever/
+ userEmail’ ;
break ;
case ‘Partner’ :
targetPath += ‘/ik-wil-partner-worden’ ;
break ;
}
wixLocation . to ( targetPath );
})
. catch (( error ) => {
console . log ( “error” , error );
});
Can Someone help me please?
Thakn you!
@velogenius Could you help me please?
-
Take a look into your DATABASE, there you will find a special FIELD, where all your DYNAMIC-LINKS are stored (greyed-out ones).
-
Your link must be a STRING.
-
How to generate your link ?
a) Check first which kind of parts your link consists of.
b) generate your link by using either → + <— or a LITERALS STRING${}STRING
.
EXAMPLE:
targetPath = `/Opdrachtgever/registratie-opdrachtgever/${userEmail}`;
Thank you for the reply!
It still doesn’t work for me. I haven’t done this before, therefore my (easy) questions.
Below screenshot of my database:
I changed my link to:
targetPath += ‘/link-registratie-opdrachtgever-email/${userEmail}’
What should I change?
Thank you!
I think the correct link is:
‘/registratie-opdrachtgever/${userEmail}’
But I get redirected to my custom velo made login page. Any idea what I need to change?
There is no link from the registration button to the login button. Does this mean that after registration, the member is not automatically logged in?
Thank you!
Your DYNAMICPAGE-LINK is…
let targetPath = '/link-registratie-opdrachtgever/glenn.plees%40outlook.be'
… as i can see.
There is no link from the registration button to the login button. Does this mean that after registration, the member is not automatically logged in?
If email and password is correct, you will be logged-in automaticaly.
Then you will need…
https://www.wix.com/velo/reference/wix-users/onlogin