Play

Inline Form Errors

Jocelyn
Post to Twitter

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

#1 |
Anonymous

cdsad

#2 |
Anonymous

test

#3 |
Anonymous

mnbmb

#4 |
Anonymous

tester

#5 |
Anonymous
asdas

asdasdasd

#6 |
Anonymous

erwfgdsgr

#7 |
Anonymous
sd

sdsdsd

#8 |
Anonymous

xcvxcv

#9 |
Anonymous

ccbv

#10 |
Anonymous

Test form

Add comment

  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags
  • Websites and email addresses turn into links automatically
  • Use one of the forms name.module, name.theme, name.translation, name.installprofile or name.project, in order to link to http://drupal.org/project/name. Note that a link will be generated even if a project does not exist
  • Lines and paragraphs break automatically
Your email will not be displayed publicly. If you have a Gravatar account, used to display your avatar.

jsfwd on Twitter 

  • BIXI debuts bike sharing program in Toronto http://bit.ly/cTruQl 1 day 21 hours ago
  • Vote #Toronto to host DrupalCon 2012 North America http://bit.ly/aXgBkJ 3 days 19 hours ago
  • Toronto #Drupal meetup tonight 6:30pm @CSI http://bit.ly/cGL63w 4 days 19 hours ago
  • Display a Twitter Profile using YQL & jQuery http://bit.ly/ajAfu6 5 days 21 hours ago
  • Google Images got a facelift.... size, type & colour filters... pagers gone... wow! 1 week 2 days ago
  • Wouldn't that just be Drupal? RT @becircle: I just heard the words I feared I might hear some day "They created a GUI for Drush" #drupal 1 week 3 days ago
  • #Raptors acquire Leandro Barbosa... w00t w00t!! 2 weeks 5 days ago
  • The NBA is a whole lot less interesting today. 3 weeks 22 hours ago
  • Site Aliases, Groups and Remote Capabilities! RT @lwalk: New features in Drush 3 http://bit.ly/aIzmxw #drush #drupal 4 weeks 2 days ago
  • Twitter delays the OAuthcalypse another 6 weeks http://countdowntooauth.com 4 weeks 3 days ago
@jsfwd on Twitter »
i heart Drupal