django-crispy-forms / django-crispy-forms/django-crispy-forms

Option to to disable non field errors

Open
#1,380 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.2k
Forks
731
PR merge metrics
No merged PRs in 30d

Description

* Package version: 2.1
* Django version: 4.2.10
* Python version: 3.12
* Template pack: crispy-bootstrap5 2023.10

### Description:

I am dealing with a complex form that attaches two layout helpers to one form as parts of the form are rendered in two different locations. Unfortunately, there is currently no option to disable the `non_field_errors` on its own (only all field errors using `form_show_errors`). That is why these `non_field_errors` are rendered twice in this case (on top of each form helper). I must overwrite the whole form template to disable the "non_field_errors" on one of these layouts.

Wouldn't something like `form_show_non_field_errors` be a good addition to `django_crispy_forms`? It would also help if the `non_field_errors` should be rendered in a completely different location (and not just at the top of the form).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.