I would like to add a simple sign up button on the homepage, which will take them to the standard login/sign up form and continue the regular process of login/sign up options.
I am using the standard sign up form for website.
Checked this old post it is having a bunch of links to code etc . but no solution to create a simple button /link to take to the the standard sign up form.
1 Like
You can accomplish this using a button and authentication.promptLogin() from the Wix Members API.
promptLogin() has optional parameters you can change to toggle between signup/login and fullscreen/modal view.
Here is a example of how to implement it:
import { authentication } from "wix-members";
$w.onReady(function () {
$w("#signup").onClick(() => {
const options = {
mode: "signup",
modal: false,
};
authentication
.promptLogin(options)
.then(() => {
console.log("This code runs once the user has signed up or logged in.");
})
.catch((error) => {
console.error(error);
});
});
});
Thank you so much Thomas Jimenez