There are two things that come to mind immediately, but I think there are other approaches as well.<br><br>1. AJAX-enabled form elements put the errors by default right with the element. This is often good. You can also put them anywhere with a little fiddling.<br>
<br>2. Using hook_page_alter() you can change the location of the dsm messages (D7). That&#39;s easy and might be an appropriate approach.<br><br>I imagine a simple change to page.tpl.php would also allow you to put your messages in a more appropriate place.<br>
<br>I really think this is a #fail in Drupal, as it&#39;s a very common problem. Users often miss error messages because they show up out of context. I&#39;d certainly welcome a D8 fix for this.<br><br>-Randy<br><br><div class="gmail_quote">
On Thu, May 26, 2011 at 4:18 AM, Steven Jones <span dir="ltr">&lt;<a href="mailto:steven.jones@computerminds.co.uk">steven.jones@computerminds.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello developers,<br>
<br>
We&#39;re building a site that has a form in a block in one of our<br>
sidebars. If the user enters incorrect values, the form validation<br>
happens correctly, and errors are flagged up. However the messages<br>
such as:<br>
<br>
&#39;The title field is required&#39;<br>
<br>
Appear in the main messages region, at the top of the page content,<br>
which is nowhere near our form on the page, which is in a sidebar. The<br>
fields in the form are highlighted, so the user can see that something<br>
is wrong with the input, but the messages are a mile away.<br>
<br>
Is there any module or method for getting the validation messages for<br>
the current form in the location of the form itself, and out of the<br>
global messages? Or any effort to get something like this into core?<br>
I&#39;m happy to code something if I need to, just wondered if anyone had<br>
tackled this before?<br>
<br>
Regards<br>
Steven Jones<br>
ComputerMinds ltd - Perfect Drupal Websites<br>
<br>
Phone : 024 7666 7277<br>
Mobile : <a href="tel:07702%20131%20576" value="+17702131576">07702 131 576</a><br>
Twitter : darthsteven<br>
<a href="http://www.computerminds.co.uk" target="_blank">http://www.computerminds.co.uk</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>Drupal Module and Site Development<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1  970.462.7450<br><br>