We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45595
    • 2 Posts
    preHooks does not work, if username and password entered correctly. For example, recaptcha does not display any erroror in that case, and user can login without it, and my own preHook too. But if username or pass entered wrong, preHooks display error. So, it looks like: first of all, checked username and pass, and only then checking preHooks. Where can be mistake?

    <div class="loginForm">
        <div class="loginMessage">[[+errors]]</div>
        <div class="loginLogin">
            <form class="loginLoginForm" action="[[~[[*id]]]]" method="post">
                <fieldset class="loginLoginFieldset">
                    <legend class="loginLegend">[[+actionMsg]]</legend>
                    <label class="loginUsernameLabel">[[%login.username]]
                        <input class="loginUsername" type="text" name="username" />
                    <label class="loginPasswordLabel">[[%login.password]]
                        <input class="loginPassword" type="password" name="password" />
                    <input class="returnUrl" type="hidden" name="returnUrl" value="[[+request_uri]]" />
                    <input class="loginLoginValue" type="hidden" name="service" value="login" />
                    <span class="loginLoginButton"><input type="submit" name="Login" value="[[+actionMsg]]" /></span>

    Calling snippet:
    [[!Login? &preHooks=`recaptcha`]]

    recaptcha displyed correctly, keys entered too.

    Please help, I cant closed eyes on it