Modal to sign up - Stop it from redirects. Answered

If i have a modal to sign up that pops up, how do i stop it from redirecting after the sign-up and instead close the modal and continue on the page? It's a CMS page so I can't set the plan level to redirect to the page as it's dynamic. I just want it to NOT redirect at all.

I deleted the redirects, but it auto sends to homepage it looks like

Comments

15 comments

  • Comment author
    Julian Galluzzo

    Would it be fine if it refreshes but stays on the same page?

    0
  • Comment author
    Timothy Makalinao

    yes!

    0
  • Comment author
    Julian Galluzzo

    looking into it now

    https://www.loom.com/share/de8e9fdf313444e8a2c599fb8282c69b

    Code 1:

    <script>
    // sets the url of the page you're on for redirecting back to it
    localStorage.setItem('locat', location.href);
    </script>

    Code 2:

    <script>
    // redirects back to the page you were just on
    window.location = localStorage.getItem('locat');
    </script>
    0
  • Comment author
    Timothy Makalinao

    ok i have it redirecting to the success page

    but it isn't going back

    0
  • Comment author
    Julian Galluzzo

    Do you have the first script implemented at a sitewide level or a page level?

    0
  • Comment author
    Timothy Makalinao

    found the issue

    a capital in the URL redirect

    0
  • Comment author
    Julian Galluzzo

    is it working now?

    0
  • Comment author
    Timothy Makalinao

    Woo! Works

    as always thank you

    0
  • Comment author
    Julian Galluzzo

    Sweeeeet!

    No problem 🙏 If anything else comes up, happy to help - this is beneficial for me too as it helps me figure out what everyone needs, then I can make a resource & tutorial on it!

    0
  • Comment author
    Timothy Makalinao

    https://workwise-ec83a3.webflow.io/job-postings/sephora-assistant-store-manager-soho-1229

    Thanks if helpful here's a CMS page of what I've been building

    Clicking the apply now button now makes you sign-up and then it refreshes and then lets you apply

    and last week you helped me build that commute estimator below

    i figured out the google api code to it, but still getting used to the memberstack stuff

    0
  • Comment author
    Julian Galluzzo

    This is awesome 🙌 Do you have all this data auto calculating?

    0
  • Comment author
    Timothy Makalinao

    half and half

    in a backend for a lot of the job stuff

    autocalculating in the page for a lot of the tables

    and taking memberstack data and using that to calculate values as well

    0
  • Comment author
    Julian Galluzzo

    Great use case, how long have you been working on this for?

    0
  • Comment author
    Timothy Makalinao

    4 months! we just started more heavily integrating sign-ups and logins recently even though I've had memberstack for awhile.

    We actually just got VC funding as this is our MVP and our eng team is now building a react native app, while I maintain the MVP and do improvements to help us gather user data and information (hence why we've been integrating and focusing on signing up and logging in)

    memberstack has some great functionality

    0
  • Comment author
    Julian Galluzzo

    One thing you may/may not know about Memberstack is that it's made to scale with you, so you will easily be able to bring all your MVP users to your react app

    0

Please sign in to leave a comment.