1

I can only find the following method in the documentation (https://solspace.com/craft/freeform/docs/form/#templates)

form.hasErrors

Is there an array available with all the error messages combined? I'm looking for a way to iterate over all form errors.

1

There currently isn't a way to get all errors directly from the form, but you could do it this way for now:

{% for row in form %}
    {% for field in row %}
        {% for error in field.getErrors %}
            {{ error }}
        {% endfor %}
    {% endfor %}
{% endfor %}
1
  • Ok too bad it isn't stored globally for the form, but this'll work for now :) Nov 7 '16 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.