[Fixed]-Django ModelForm: the form in the html cannot enter data and submit

0👍

Your form is being shadowed by an absolutely positioned element in your html.
try adding this to your css:

form{ position:absolute;z-index:100 }

This will lift your form above whatever is shadowing it.

1👍

I found a small error in your code:

if self.request.method == 'POST' and request.is_ajax:

should be

if self.request.method == 'POST' and request.is_ajax():

Note the ()

Also: Change the button from submit to button.

Leave a comment