• Resolved bergaul

    (@bergaul)


    Hello, thank you so much for the wonderful plugin!

    I’m using a created Elementor Popup template, which hosts a shortcode for a website login form. This popup is triggered by clicking on a menu item that has a selector assigned to it. Everything is fine, the form opens and works, but until someone enters erroneous data (does not pass authorization). After that, when I call popup again, I see the same form with an error output (wrong password or blank fields).

    I understand that the authorization form works with page refresh. I have tried various solutions:

    var $login_errors = jQuery('div.um-login .um-field-error');
    if ( $login_errors.length > 0 ) {
      jQuery('#uc_simple_popup_elementor_8a9573d a').trigger('click');
    }

    Unfortunately, the given code in this example doesn’t work in my case (I was outputting a message to the console to check if the first condition to look for a login error was met, the message was outputting fine, but then the click event was not executed). I changed the id’s to my own in the .trigger(‘click’) event: to the id of the popup form, but different buttons that would cause the popup to open.

    • I tried using AJAX to submit the form asynchronously without reloading the page. But ran into a number of problems, including not being able to determine the path to the UM form handler to apply in the action attribute.

    If you have any examples or recommendations, please share them. I would like to utilize your forms features in a faster solution for the end user – via popup, without having to visit additional pages.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hello @bergaul,

    You have to modify a code to find a menu item that opens popup with the login form by its id attribute.

    First you should test in the console, that you can find a button. You need an id of the button/link, not the id of the popup form. Use a proper id and type this in console:

    jQuery('#PROPER_ID a')

    jQuery should return an object with length 1. Once you can find a the button/link, then use a proper selector in the code.

    Regards

    Thread Starter bergaul

    (@bergaul)

    Thanks for the reply @yuriinalivaiko! Unfortunately, it doesn’t work in my case. I used different element IDs (buttons, menus), but the call of the “click” event on the element with the selected ID doesn’t happen. Tried wrapping the code in a DOM wrapper, that didn’t help either. I will continue to try different variants.

    If you can add a popup function for authorization and/or AJAX to submit the form asynchronously without reloading the page, that would be great. I’m sure this would be appreciated by many users of your plugin.

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Sorry @bergaul, I can not advise you a proper selector because I don’t see your site.

    We are going to add the AJAX feature you asked for in the major release. This can not be added now because it requires a big rebuild of the code.

    Regards

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hi bergaul,

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help.

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Login in popup’ is closed to new replies.