Support » Plugin: User registration & user profile - Profile Builder » Register / Login in modal (AJAX) dialog?

  • Resolved AngryGerman


    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?


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Cristian Antohe


    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.

    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.

    Plugin Author Cristian Antohe


    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Register / Login in modal (AJAX) dialog?’ is closed to new replies.