Relative Content

Tag Archive for javascriptpythondjangodjango-forms

How to manage multiple formset in Django with JavaScript

I have the following problem: I’m loading a form(Form A “Evento”) for the User of application fill, in that Form I have to load dynamically another form(Form B “Logistica”), so that the User can add several Form B just clicking the button. I managed to load dynamically these Logistica/Form B for the User, but when I go to the saving part I only managed to receive the fields in a tuple, for example the Form B has a field called “nome”, instead of receiving N FormB “nome” fields, I receive only 1 with a [] with the values of each Form. I realize that Django is thinking that instead of N FormB, I have only 1 FormB and it is concatenating the fields
Problem https://github.com/ian-santos-nascimento/Django-event-management