We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40828
    • 22 Posts
    Thank you very much, I have created the resource and put the snippet tag on it. I also changed the post line to this:

    $.post('[[~14]]', {action: action}, function(data){
    


    So now I get the needed piece. Thank you very much again.

    But when I put incorrect login into the form I get "{{+errors}}" message above the login form instead the message inself. So it seems like the MODX pares do not parse the placeholder in this way.

    After the correct login it redirects to the Ajax resource (~14) instead of just displaying the Logout link. I'm not sure if that is a same issue or not.
    • Actually, yes, it is. It all depends on exactly what is getting returned by the formit snippet. Usually since you're seeing this on the same page as the formit snippet call, placeholders get processed properly. But since the placeholder is being inserted into a different page altogether, you're getting the unprocessed placeholder tags. Likewise, the formit is generating the redirect to itself, which normally is what is wanted.

      I've never used formit as an AJAX processor; I've used eForm in Evo but it behaves differently (for one thing it generates the form as well, which formit does not). It would take some fiddling to determine how to use formit as an AJAX processor. I'm pretty sure all the properties necessary to get it working are available, I just don't know what they are at this point.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 40828
        • 22 Posts
        I understand. You helped me a lot already so I understood the basics. I will try all over again with the #fuzzicallogic tutorials about Ajax, maybe that will fly.