How to redirect existing users from Webflow signup form to login page when email is already registered? Answered
I want to redirect a member from the signup form to the login form. Currently when someone who already has an account fills the form in the landing page it says "email has already been taken", so I want to redirect them to the login form when that happens. How can I do that?
Comments
6 comments
Hello Rafael 👋
That will probably need some custom code, maybe Chukwudi Josh Lopez has some quick pre-written code for you. Maybe someone in the community has some solutions as well.
The no-code solution would be to just add a link on your sign up form that directly links to login page. You could name the link as “Already a member? Login in here”
This would take some custom code. To do this you would need to use the DOM package to login members and redirect based on the response.
Thanks Josh!
Hello, I I am trying to add a login-redirect action to onboarding form after sign up. I have member-specific redirects to user dashboards and would like to send users there after they complete thier profile form. Where do I put the login-redirect attribute? When it's place on the submit button it doesnt actually submit the form data, it only redirects. If I place it at the form level, it redirects as soon as I click into the form. Thanks for the help! (p.s. working in Webflow)
Hi Andrew,
Based on your situation, I recommend using code to handle the login redirect to a member-specific page. Here’s how you can set it up:
Step 1: If you’ve already configured a URL login redirect for your plan (or set a default redirect if you don’t have a plan), you can skip to Step 3. If not, set the login redirect URL (e.g., success) in your plan settings or as the default redirect in Memberstack. please refer to the instructions in this article as a guide.
Step 2: Create a blank page in Webflow and name it "success."
Step 3: Paste the code below before the closing </head> tag of your the "success" page or the existing page you have as your Login redirect for your plan or set in the default redirect if you don’t have a plan :
Let me know if you need further clarification or assistance!
Thanks!
Please sign in to leave a comment.