1

I am looking for some advice on how best to add error messages (eg incorrect password / username) on a custom Login form.

Tried the usual routes for documentation but have seen nothing as yet - all help appreciated.

Dan

1
  • I'm having the same issue, following the docs with: {% if errorMessage is defined %} {{ errorMessage }} {% endif %} But receiving no error messages if email or password are invalid: melnet.org.nz/professionals
    – Ryan
    Commented Jan 31, 2015 at 7:50

1 Answer 1

1

Any login validation errors are passed back to the form and available via the Twig {{ errorMessage }} variable.

You can see an example of how to display them on a login form here: http://buildwithcraft.com/docs/templating/login-form

1
  • Thanks Brad - totally missed that and useful to know. Error messages may be a good section for the docs, as it's something always found in the other topic areas.
    – Dan G
    Commented Sep 14, 2014 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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