2

I'm new to ExpressionEngine and I was wondering if there is a way to display status and error messages inline instead of on their own page?

For instance, it would be nice, if someone got their password wrong, if it didn't show you that on a separate page, but instead showed you that on the same page (similar to the way Drupal does it).

thanks!

3
  • possible duplicate of Turn off Message Pages after login? – Alex Kendrick Feb 21 '13 at 14:51
  • No, I'm sorry, I should have been more clear, I'm looking for a way to use inline messages universally (across all forms / pages). Perhaps with a template tag or something. – David Barratt Feb 21 '13 at 15:48
  • See the answer suggested by Siebird in that post: Custom System Messages. It doesn't move the errors inline, but it does catch all system messages and allow you to display the errors in a normal EE template. – Alex Kendrick Feb 21 '13 at 15:55
2

It depends for each scenario. For member registration & login with inline error handling, we have created a free plugin called FreeMember which is quite popular.

There are also other commercial member plugins which provide inline error handling and more (e.g. custom member fields using any fieldtype) such as Zoo Visitor, Profile:Edit and Safecracker Registration.

For each scenario you need to look for different plugins. For example, Safecracker (front end entry forms) provides inline error handling out of the box. Comment forms you will need to investigate different solutions etc.

3
  • ok, so there is no universal way to catch the EE errors and display them with a template tag? – David Barratt Feb 21 '13 at 15:42
  • No (that wouldn't be possible because its not something that's built in to EE). There are ways to customize that ridiculous error page or the text on it, but if you want to display the errors inline, you need to use add-ons for your specific scenario. – Adrian Macneil Feb 22 '13 at 1:10
  • Another alternative: if you're good with javascript, you could capture form-submit, do the submit with ajax and, depending on the result-message, for instance show a modal or redirect after success. (edit: mediagirl mentions this option too :) ) – GDmac Feb 22 '13 at 8:16
2

I don't know of a way to display system errors in a template tag.

But you can use the Custom System Messages addon to move system messages into a template. This gives you more control over customizing the errors.

If you have JS skills, there's no reason you shouldn't be able to submit your login form using Ajax and show an appropriate error on the screen. You'd write a conditional based on the action ID ({action}) in the template to handle login errors in a specific manner and all other errors regularly.

This extension lets you define any 2 templates within your template groups to be used as the error page. You have access to all the usual variables from the Specialty Templates, plus two new ones {referrer} and {action}.

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.