Answers.Body: <p>I'm not sure if this is the intended way, but I rigged this up and so far it works well.</p>
  
  <pre><code>{% set yankee = craft.amForms.getForm('hotel') %}
  
  {% macro foxtrot(errors) %}
      {% if errors %}
          &lt;ul class="errors"&gt;
              {% for error in errors %}
                  &lt;li&gt;{{ error }}&lt;/li&gt;
              {% endfor %}
          &lt;/ul&gt;
      {% endif %}
  {% endmacro %}
  
  {% from _self import foxtrot %}
  
  {# list of form errors #}
  {% if hotel is defined %}
      &lt;div class="error-class"&gt;
          {% set fields = yankee.getFields() %}
          &lt;h4&gt;Please correct the errors listed below before submitting the form.&lt;/h4&gt;
          &lt;ol&gt;
              {% for field in fields %}
                  {{ foxtrot(hotel.getErrors(field.handle)) }}
              {% endfor %}
          &lt;/ol&gt;
      &lt;/div&gt;
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-04T01:39:43.083Z
Answers.LastActivityDate: 2017-09-04T01:39:43.083Z
Answers.UserDisplayName: Ryan
Body: <p>I'm using <a href="https://github.com/am-impact/amforms" rel="nofollow noreferrer">amforms</a> and would like to display all form errors at the top of my page, not just per field. I can't seem to find the answer in the docs. Is this option available?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-04T01:26:49.390Z
Comments.Text: Never used the plugin, but looking at the docs, I'd suspect `formHandle.getErrors()` would return a multi-dimensional array with the key being the attribute and the values being an array of errors.
Comments.UserDisplayName: Brad Bell
Tags: <validation><plugin-amforms>
Title: Show all form errrors using amforms
ThreadText: # Show all form errrors using amforms
  
  (Asked by: username_0 on 2017-09-03)
  
  I'm using [amforms](https://github.com/am-impact/amforms) and would like to display all form errors at the top of my page, not just per field. I can't seem to find the answer in the docs. Is this option available?
  
  **Tags:** validation, plugin-amforms
  
  > **Comments:**
  > **username_1**: Never used the plugin, but looking at the docs, I'd suspect `formHandle.getErrors()` would return a multi-dimensional array with the key being the attribute and the values being an array of errors.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-09-04. Score: 1 | Accepted answer
  
  I'm not sure if this is the intended way, but I rigged this up and so far it works well.
  
  ```
  {% set yankee = craft.amForms.getForm('hotel') %}
  
  {% macro foxtrot(errors) %}
      {% if errors %}
          <ul class="errors">
              {% for error in errors %}
                  <li>{{ error }}</li>
              {% endfor %}
          </ul>
      {% endif %}
  {% endmacro %}
  
  {% from _self import foxtrot %}
  
  {# list of form errors #}
  {% if hotel is defined %}
      <div class="error-class">
          {% set fields = yankee.getFields() %}
          <h4>Please correct the errors listed below before submitting the form.</h4>
          <ol>
              {% for field in fields %}
                  {{ foxtrot(hotel.getErrors(field.handle)) }}
              {% endfor %}
          </ol>
      </div>
  {% endif %}
  
  ```
  
  
  ---
  
  