How to send multiple forms with Ajax (FormData) in Django

preview_player
Показать описание
Hey everyone! In this tutorial I am going to show you how to send multiple forms in Django using Ajax and FormData. Normally, it's also possible to send forms only with Ajax by defining data inside the function. However, with FormData it becomes much simpler and faster to handle the form submission.

Stay Connected!

Рекомендации по теме
Комментарии
Автор

Thank you bro, you solved my problem i appreciate your hardworking. My Allah Bless you

Anonymous-rtvc
Автор

Great tutorial!
Is there a way to leverage form-validation from let's say ModelForm widgets with this Multiform method?
I tried using ModelForm with the jquery, but any button I click submits the request, even if I have specified no action attribute in the form.

priyankkharat
Автор

How validate data automatically with django

alfonsoluvargas
Автор

couldn't we just pass the form id into the FormData as FormData('#myform')[0]) like this ? if not, why not?

developers_hub