Profile Builder - front-end user registration, login and edit profile
[resolved] Register / Login in modal (AJAX) dialog? (4 posts)

  1. AngryGerman
    Posted 1 year ago #

    Is it possible to use the login and registration features of Profile Builder inside a modal dialog, instead of on a separately-loaded page?

    I would like to use a JS-driven login / register button on my pages, which, when clicked, opens a modal dialog with the login / registration forms inside, and which then reloads the page (or redirects to a specified page) from there, rather than showing the login/register forms on their own separate pages.

    If so, how would I get this to work?



  2. Cristian Antohe
    Plugin Author

    Posted 1 year ago #

    It can work.

    - create a page template without header or footer.
    - create a login page with that page template that has the [wppb-login] shortcode.
    - open that page in a modal window of your choice.

    Notes. If you log in in the modal and then close it, it won't reflect in the page that initiated the modal because you logged in a different page. So you'll want to do a page reload on modal close. (can be done via configuring the modal or writing a bit of code)

    Alternatively, you can use the Profile Builder widget or the shortcode inside a text widget, if you don't want a stand alone page.

  3. AngryGerman
    Posted 1 year ago #

    Thanks for the quick response.

    In that case, how would I ensure that the page doesn't get reloaded when the user enters an incorrect password when signing in, for example?

    As it stands, it seems that the login page gets loaded in the modal window, and then the page reloads no matter what, when the user clicks "log in" - even if the password is wrong.

  4. Cristian Antohe
    Plugin Author

    Posted 1 year ago #

    You won't have that problem because it page will reload inside the iframe of the modal.

    And then, theoretically, you can connect to the close modal trigger, check via javascript if the auth cookie is present and then reload the main page (not the page in the modal iframe).

    Hope this makes sense.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic