[Fixed]-How to send multiple input field values with same name?

29👍

I don’t know how to do that with Forms, but if you want to grab the values in the raw way, here’s how I’d do:

relations = request.POST.getlist('relations')
👤Tiago

5👍

You don’t need to grab all the raw values, you can just get the specific data by using element name like this:

relations = request.form.getlist('relations')

That will return a list of values in the relations input.

1👍

this generate a list, you can manipulate in for

request.POST.getlist('relations')

Leave a comment