Inline Form Errors

I've released my first Drupal module... Inline Errors.

In most Drupal themes, $messages is located at the top of your page.tpl.php. However on most sites, forms such as the comment form are located at the bottom of your page. So should someone submit a comment that has errors, they're kicked back to the top of the page and have to scroll back down to fix their submission.

Without making any adjustments to the placement of your $messages in your theme, you can enable Inline Errors for any of your site forms such as contact, comments or webforms at admin/settings/inline_errors.

With a little jQuery and the jQuery ScrollTo plugin, Inline Errors will capture the $messages, place them just above your form and move the page to the top of the form.

You can enable Inline Errors for any form that implements hook_form() at admin/settings/inline_errors

If you want to see this module in action... submit an empty comment on this page.

» Inline Errors project page

While the module has been tested with several core & contributed modules, further testing with different modules is needed, so should you use Inline Errors, and encounter bugs with any specific modules, drop me a line.

Comments

xcvxcv

xcvxcv

ccbv

ccbv

Test form

Test form

Add comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags
  • Lines and paragraphs break automatically
  • Websites and email addresses turn into links automatically

jsfwd on Twitter 

  • 13 hours 13 min ago hot damn rock vs rap!! thanks json RT @jswaby: @jsfwd http://www.sfspodcast.com rock vs rap
  • 13 hours 27 min ago #Raptors taking 5th seed back tonight! (with a little help from Boston)
  • 1 day 17 hours ago Two screens are better than one. I want. RT @BeCircle Yeah - iPad pwned by Courier. Way cooler and way more useful. http://bit.ly/aO4DqS
  • 4 days 18 hours ago World's largest gummy bear?!? http://www.giantgummybear.com I want one!
  • 5 days 21 hours ago Firefox 3.5 supports the word-wrap CSS property, finally :)
  • 6 days 12 hours ago Has anyone using #drupal and #mollom had any spam problems after upgrading from 6.x-1.10 to 6.x-1.12?
  • 6 days 12 hours ago @mollom has been almost flawless at blocking spam, but now cleaning uber-spam that started after upgrading the drupal module to 6.x-1.12.
  • 2 weeks 1 day ago February Drupal Toronto Meetup tonight... Topic: 'All about hosting' http://bit.ly/d8xM20
  • 2 weeks 5 days ago Since my earlier tweet re: http://pleaserobme #foursquare I've received over 7000 new opportunities! Who says there's a recession?
  • 2 weeks 5 days ago Tweeting your location can be hazardous to your home http://pleaserobme.com #foursquare
more jsfwd on Twitter »
i heart monkeys