Skip to content
Advertisement

Ajax Flask Retrieve Data of Multiple Forms in Server Side

I am sending multiple form data as an formdata object using ajax to python flask. Just like the example here.

In the below code, I am sending data of two forms using ajax to flask. I can’t retrieve it on server side, However I managed to get files using request.files on python.

But I can’t retrieve or see the form data object which is appended to ajax request having id “form-2”.

How can I see the input values filled on second form in the back end.

JavaScript

Advertisement

Answer

You cannot append a form data object into another form data object, you have to append the fields from the second form into the first form data object.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement