Error messages not displayed with crispy forms 1.7.2 (we had a CSS bug)
See original GitHub issue- Package version: django-crispy-forms==1.7.2
- Django version: Django==1.11.23
- Python version: 3.5 & 3.6
- Template pack:
CRISPY_TEMPLATE_PACK = 'bootstrap4'
CRISPY_FAIL_SILENTLY = False
Description:
I need help. I don’t know how to display error messages in crispy forms. Currently error messages which are not related to a specific field are not displayed. Error messages related to a specific field are displayed. I need to display all the error messages on the form and I don’t know how? I didn’t find it on the documentation of crispy forms.
You can see my current code on https://github.com/speedy-net/speedy-net/tree/staging
The forms not working right now with error messages are with URL /matches/settings/about-my-match/
The template only contains {% crispy form %}
.
Preferably also include:
- Example Django Crispy Forms code
- Screenshots
When I select a min age higher than max age I do see an error message:
But when I don’t select any gender there is no error message:
Also, when the diet (for example) doesn’t contain 5 hearts I can’t see the error message:
Error messages for fields such as min age and max age are displayed correctly.
In all the 4 cases above the user is not redirected to the success URL.
- Actual HTML generated
- Expected HTML
Issue Analytics
- State:
- Created 4 years ago
- Comments:20
Top GitHub Comments
Super. Thanks for the follow-up. Maybe it helps someone else in the future!
OK, so I’d have a look what else you have going on in there… (Sorry I don’t think I can help you right now…)