django-crispy-forms: Error messages not displayed with crispy forms 1.7.2 (we had a CSS bug)

  • 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: 2019-08-07_1300_crispy_1

But when I don’t select any gender there is no error message: 2019-08-07_1300_crispy_2

Also, when the diet (for example) doesn’t contain 5 hearts I can’t see the error message: 2019-08-07_1304_crispy_3

Error messages for fields such as min age and max age are displayed correctly. 2019-08-07_1307_crispy_4

In all the 4 cases above the user is not redirected to the success URL.

  • Actual HTML generated
  • Expected HTML

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20

Most upvoted 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…)