Forum Discussion

Han's avatar
Han
Ace
7 years ago

Standalone Registration Modal

We are using the login modal on our community and within this you can open the registration modal. However, we would like to seperate these so it's clearer for the user to to open either the "Login" or the "Register" modal from the community page. 

Any ideas on how to get the "user-registration-form" to display without having to click through the login modal? 

  • We have found a solution, posting here incase anyone else anyone else has the same problem.

    There is an existing component called  "common.widget.user-navigation-combine", which has all the functionality we needed. It was as simple as updating the page quilt :smileyhappy:

7 Replies

  • Han

    You can create a new button for the registration link like we did here https://prnt.sc/j12qyj. You just need to link it with the user registration page using href= "/t5/user/userregistrationpage"

    Here is the element 

    <a class="lia-link-navigation registration-link lia-component-users-action-registration" rel="nofollow" href="/t5/user/userregistrationpage?dest_url=https%3A%2F%2Fhsszz63362.stage.lithium.com%2F">
    	<span class="link-label register detailed">Create an Account to Participate</span>
    </a>

     

  • Han's avatar
    Han
    Ace
    7 years ago

    VikasB I still would like to make the registration open in a modal. Do you know how we could do this? 

  • snaffle's avatar
    snaffle
    Expert
    7 years ago

    Hi VikasB,

     

    Just further to Han's last comment, what we're trying to do is still have the login/registration load in the modal popup but have it display the Registration page initally, rather than the Login page.

     

    Any ideas how we might go about doing that?

     

    Thanks

     

    Nathan

  • Hi snaffle,

    Got your email, i'll respond here so others can see as well...

    I'm not aware of a way to mod the current lightbox quilt to show the registration form and login form separately.  There might be a way to edit the quilt, but i havent looked to verify.

     

    If there isnt, another solution would be to use js to hack around this. You can create a custom link for "Registration", bind a click event to it that would mimic the current default Login link. But the difference is, you'll also use js to "click" the registration link so that your duplicate lightbox would appear to show the registration form first...from an end-user standpoint, that means this would be a Registration lightbox.  It's a messy solution, but it could work if there is no other way. I hope that makes sense.

     

     As always, let me know if you have any questions.

    Tri

  • snaffle's avatar
    snaffle
    Expert
    7 years ago

    Thanks triSolutionFuse, the javascript workaround sounds do-able so if we can't modify the quilts, we'll have a look at that.

     

    Many thanks for the suggestion.

     

    Nathan

  • Han's avatar
    Han
    Ace
    7 years ago

    Hi triSolutionFuse,

    Thank you for your reply.

    Unfortunately I cannot find anywhere to edit the quilt, so I tried to add in another link to open the login dialog modal. However, I am not sure what I am missing as when I add in the exact same code as the existing login modal link, I cannot get the login modal to open. I tried deleting the older login link to see if my line of code would work, but nothing changed the login modal still won't open. 

    Do you have any ideas as to what I might be missing?

    Thanks,
    Han

  • Han's avatar
    Han
    Ace
    7 years ago

    We have found a solution, posting here incase anyone else anyone else has the same problem.

    There is an existing component called  "common.widget.user-navigation-combine", which has all the functionality we needed. It was as simple as updating the page quilt :smileyhappy: