1

Another day, another question!

I've started using Freemember (really like the inline validation).

So i have an update password form.

{exp:freemember:update_profile return="members/account/{member_id}/password/success" require="current_password" error_handling="inline" form_class="update-account"}

    <p>In order to change your password you must first enter your current password.</p>

    <div class="control-group"> 
        <label class="control-label">Current password</label>
        <div class="controls">
            <input type="password" name="current_password" value="{current_password}" class="span11" />
            <span class="help-block">{error:current_password}</span>
        </div>
    </div>

    <p>You can now choose a new password. For security, we recommend a minimum of 6 characters.</p>

    <div class="control-group"> 
        <label class="control-label">New password</label>
        <div class="controls">
            <input type="password" name="password" value="{password}" class="span11" />
            <span class="help-block">{error:password}</span>
        </div>
    </div>

    <div class="control-group"> 
        <label class="control-label">Confirm new password</label>
        <div class="controls">
            <input type="password" name="password_confirm" value="{password_confirm}" class="span11" />
            <span class="help-block">{error:password_confirm}</span>
        </div>
    </div>

    <input type="hidden" name="username" value="{username}" />

    <button type="submit" class="btn btn-green" name="submit" value="Update Profile">Update My Profile</button>

{/exp:freemember:update_profile}

it validates inline perfectly, however it does not actually change anything. i.e, if I put in the right "current" password, and change the password, it refreshes, but it does not redirect and no setting are changed.

Any ideas?

  • The first thing you should do to troubleshoot is remove inline error handling from the opening tag to make sure you are not getting any errors. – Justin Long Feb 1 '13 at 15:28
  • Thanks for that, although I seem to have cured it by entering the first name and last name fields as hidden values. I think it might be because these are marked as required member fields? – shorn Feb 1 '13 at 16:11
  • 3
    Correct. If you set fields as required in EE they will always throw errors in FreeMember. It's best to not make the fields required in EE and rely solely on the FreeMember validation. – Adrian Macneil Feb 1 '13 at 16:16
2

To troubleshoot forms which are submitting but not displaying errors, you should always remove error_handling="inline" as a first step (as Justin mentioned). This means all errors will be displayed, in case you have forgotten to template any inline errors.

To clarify what it sounds like your underlying problem was: If any custom member fields are marked as "required" in the ExpressionEngine member settings, they will be required in FreeMember. When using FreeMember, it's much easier to not make any fields required in the ExpressionEngine member settings - just use the FreeMember validation parameters (such as require="") to make the fields required in your actual registration/update templates.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.