On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I am using ChangePassword as part of the Login extra.

    It functioning perfectly well & changing the password, but, after click on the 'Change Password' button the page stays exactly the same with no indication to the user/member that the password change was successful.

    Here is the code I'm using:

    <h2>Change Password</h2>
    [[!ChangePassword?
       &submitVar=`change-password`
       &placeholderPrefix=`cp.`
       &validateOldPassword=`1`
       &validate=`nospam:blank`
       &reloadOnSuccess=`0`
       &successMessage=`<p><a>You Have Successfully Reset Your Password</a></p>`
    ]]
    <div class="updprof-error">[[!+cp.error_message]]</div>
    <form class="form" action="[[~[[*id]]]]" method="post">
        <input type="hidden" name="nospam" value="" />
        <div class="ff">
            <label for="password_old">Old Password
                <span class="error">[[!+cp.error.password_old]]</span>
            </label>
            <input type="password" name="password_old" id="password_old" value="[[+cp.password_old]]" />
        </div>
        <div class="ff">
            <label for="password_new">New Password
                <span class="error">[[!+cp.error.password_new]]</span>
            </label>
            <input type="password" name="password_new" id="password_new" value="[[+cp.password_new]]" />
        </div>
        <div class="ff">
            <label for="password_new_confirm">Confirm New Password
                <span class="error">[[!+cp.error.password_new_confirm]]</span>
            </label>
            <input type="password" name="password_new_confirm" id="password_new_confirm" value="[[+cp.password_new_confirm]]" />
        </div>
        <div class="ff">
            <input type="submit" name="change-password" value="Change Password" />
        </div>
    </form>			



    The success message I have included is not shown.
    Does anyone know how to make this show the success message upon click "Change Password"?

    This question has been answered by just_nico. See the first response.

    • discuss.answer
      Did you set any placeholder for the successMessage?
      Something like this
      [[!+cp.successMessage:notempty=`<div class="whatever-class">[[!+cp.successMessage]]</div>`]] 

      and put it somewhere, e.g. right under your error div.


      successMessage
      If reloadOnSuccess is set to 0, output this message in the [prefix].successMessage placeholder.
      https://rtfm.modx.com/extras/revo/login/login.changepassword
      • Quote from: just_nico at Jul 18, 2015, 10:25 AM
        Did you set any placeholder for the successMessage?
        Something like this
        [[!+cp.successMessage:notempty=`<div class="whatever-class">[[!+cp.successMessage]]</div>`]] 

        and put it somewhere, e.g. right under your error div.


        successMessage
        If reloadOnSuccess is set to 0, output this message in the [prefix].successMessage placeholder.
        https://rtfm.modx.com/extras/revo/login/login.changepassword

        Hi just_nico,

        Thank you for that, it works perfectly smiley
        • Nice to hear, you're welcome smiley