I have some html form with fields like this:
<input type="text" name="input[]">
<input type="text" name="input[]">
<input type="text" name="input[]">
<input type="text" name="input[]">
How i can save this form with django forms?
use QueryDict.getlist
inputs = request.POST.getlist('input[]')
it's not mandatory to put []
in the name
<input type="text" name="input">...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With