Hey,
at a sign up formular I’m trying to link the sign-up-button to a page called thanks for registrating so that after someone registered through this formular and clicks on the sign up button he will directly be linked to the page “thanks for registrating”. But the problem now is that the button doesnt work as a sign up button and a link button but just as a link button. So you don’t have to enter any infos to the formular to get to the next site. And furthermore it is not possible to register anymore through this formular.
Here is the code I already added:
import wixLocation from 'wix-location';
$w.onReady(() => {
$w("#button2").onClick(()=> {
wixLocation.to("/thanks-for-registration");
})
});
That code above is just simply moving the user onto the thank you page after button 2 is clicked on using the Wix Location API and the to() function.
https://www.wix.com/corvid/reference/wix-location.html#to
If you want a button to prompt your signup or login windows to appear then you have two choices here depending on what member signup window you have used from here.
https://support.wix.com/en/article/about-the-member-signup-form
You can either make up your own Corvid login and signup lightboxes and use the promptLogin() function with given options to show your signup window first when the user clicks on a register/signup button.
https://www.wix.com/corvid/reference/wix-users.html#promptLogin
Then once the user has registered themselves on that lightbox, you can simply use the code on the lightbox page to close the lightbox and then move to the required page.
https://www.wix.com/corvid/reference/wix-window.lightbox.html#close
https://www.wix.com/corvid/reference/wix-location.html#to
If you have used the Default or the Custom options then you will need to again use the promptLogin() function on your register/signup button, however as you can’t use code with the default window you will need to them put more code on your page to do something after they have signed up and been logged in.
Then you would need to use the onLogin() function to do something after they have logged in and which for your case here would be to again move the user onto the thank you page.
There is this tutorial here for a members profile page, that does similar to what you are wanting albeit just with a login button.
https://support.wix.com/en/article/corvid-tutorial-building-your-own-members-area