django-advanced-filters icon indicating copy to clipboard operation
django-advanced-filters copied to clipboard

Getting 'This Field is required" error while submitting form for the first time

Open Nikhilsain opened this issue 2 years ago • 4 comments

I am getting this field is required error while submitting the form for the first time even after filling the form and after the second time it got submitted. It is appending the first submission query in the second submission of the form also. Why it is having so ?. Can you please fix it. image

Nikhilsain avatar Jul 22 '22 06:07 Nikhilsain

it is showing one extra form when i see through inspect html of the form i mean according to the above picture(added in issue) there should be only one row related to mobile but it is showing two one for mobile and one empty form

Nikhilsain avatar Jul 22 '22 07:07 Nikhilsain

Same experience here

kut avatar Aug 03 '22 14:08 kut

By the way - I fixed this by moving the inclusion of advanced-filters URLs BEFORE the inclusion of general Django admin. Django admin now has a catch-all error which makes advanced-filters autocomplete URLs fail if the order is wrong in your urls.py.

kut avatar Aug 05 '22 23:08 kut

Hey @kut, Thanks for figuring it out :) But this working for only a single query. For multiple queries using 'and' and 'or' operator between them, I am getting the same error and order of the queries also changes. Follwing is the screenshot attached image

Nikhilsain avatar Aug 08 '22 06:08 Nikhilsain