My motivation is to avoid creating multiple buttons for signup and login, and I like the way memberstack 1.0 modal allows users to select from login->signup, and signup->login; memberstack 2.0 modal only gives you the option signup->login.
It feels pretty simple to implement on Memberstack's side. The workarounds is I might create a custom form using your templates or just continue using your sign up modal which allows the user to also login from the modal.
2 comments
The prebuilt login modal now has a "Don't have an account?" link that switches to signup, and the signup modal links back to login.
Josh was also able to help with some code that makes it possible to do this with the DOM API:
This came from the docs: https://developers.memberstack.com/docs/dom-front-end-package#open-modals
As well as searching cmd+k for how to add an button event listener.
https://docs.memberstack.com/hc/en-us/articles/7253211946523-Converting-Memberstack-1-0-Code-to-2-0-Code
/**please switch out the planID**/
<script>
const memberstack = window.$memberstackDom
const loginButton = document.getElementById(“login-button”);
loginButton.addEventListener(“click”, () => {
memberstack.openModal(“LOGIN”, {signup: { plans:[“plan...“, “plan....“] //must be free plan id }});});
</script>
Please sign in to leave a comment.