Drupal Inline Form Errors

For the last two years I am bending Drupal UI as much as possible and approach it rather differently than I did before. Hacking the modules is not a scarry part of the development process anymore, while keeping the patches with changes available for later upgrades. It does come with a price that you have to be careful and review every upgrade, but it also has its benefits in freedom of doing it your way. Sometimes the workarounds (Drupal way) takes longer than changing one line in the code and usually these changes are often not re-usable and of no use to others. I am no longer looking at Drupal just as to what it offers and use it, but what I want user/visitor to see and how to do it. At that point I stumbled upon a nice module that did what I wanted.

With the latest launch of our pet project called microactivism, I wanted to make it prettier than standard in a short time with some behavior that was not available out of the box. One of them were inline form errors, especially needed in modal windows.

We all know these rather ugly not contextual form errors, where you have a red box on top of the page saying which fields you have to fill and then scrolling down reveals red border around the form item. This is where Inline Form Errors (IFE project page) comes into the game and nicely presents the error right below the form element. A bit of styling and there you go, not that violently presented errors.

You can try it yourself on the microactivism page, just click on the Sign in link in the top right corner (for modal), or click Sign up for normal form (and while you are at it please nominate an organisation if you know any :). You need to patch IFE to make it work for D7. Also if you are interested in helping improving error messages in D8 then follow this discussion on d.o groups http://groups.drupal.org/node/209513 (thanks Roy) issue on d.org http://drupal.org/node/447816.




Need Drupal Theming? Hire us