Hello,
Hoping a fellow Bubbler might have some ideas! I’m guessing it’s an easy fix, but I’m stymied.
Here’s my use case:
1. My login pop-up and workflow are in a reusable element 2. Users need to be redirected to different pages based on the button that triggered the login pop-up. Examples: 2.a. User is on index page where they see a product of interest. They click on “learn more”, which launches the login pop-up. After they either create an account or log in I would like to automatically redirect them to the correct product page. 2.b. User is on landing page and clicks on “sign up” or “log in”. After creating account or logging in I’d like to send them to their account page.
Because the sign up/log in workflow is housed in a repeating element, and not in the page that the login triggers are on, I’m not sure how to tie the state change to the “learn more” or “sign up/log in” buttons respectively and get users to the right place.
Custom states defined at the root level of a reusable element are accessible from the host page. That is, workflows on the page can set the RE’s custom states. Does that help? (BTW, I assumed you meant reusable element and not repeating element.)
I tried adding a custom state to the Popup “successfully logged-in/signed-up” = yes/no, on the host page made the workflow:
if button is clicked and user isn’t logged in > open popup > navigate to product page if custom state =yes.
But, it didn’t work. I suspect because it tries to execute the navigation step before the pop-up workflow has been completed.