We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25046
    • 194 Posts
    I have a form which is located quite aways down the page. When a user makes an error filling in the form, eForm correctly displays the error message in the Form box. However, when displaying the error message it also refreshes the page and sets the view to the top of the page, completely obscuring the form. Therefore the user is confused and sees no error message unless he decides to scroll down (which is not intuitive). How do I get the error function to work such that it forces the viewed page down to where the form is? Conversely, is there a way to display the error message at the top of the page?

    Thanks!
      • 7231
      • 4,205 Posts
      Add the id of the for or the wrapper div to the action and it will work as an anchor:

      <form id="feedbackForm" method="post" action="[~[*id*]~]#feedbackForm">


      Or like this to include the [+validationmessage+] plaeholder:
      <div id="myForm">
      [+validationmessage+]
      <form id="feedbackForm" method="post" action="[~[*id*]~]#myForm">
      ..
      </form>
      </div>
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 25046
        • 194 Posts
        That worked great! And it saves me the trouble of having to create separate pages to hold these forms.

        Thanks!