# let user add columns and entries

**URL:** <https://forum.djangoproject.com/t/let-user-add-columns-and-entries/2649>\
**Category:** Using Django\
**Created:** [May 27, 2020, 4:40pm UTC](https://forum.djangoproject.com/t/let-user-add-columns-and-entries/2649 "2020-05-27T16:40:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muskua](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@Muskua](https://forum.djangoproject.com/u/Muskua)\
**Post date:** [May 27, 2020, 4:40pm UTC](https://forum.djangoproject.com/t/let-user-add-columns-and-entries/2649/1 "2020-05-27T16:40:33Z")

</div>

Hi people, got an hard question maybe, can’t find anything apparently on google, still searching for it.  
In any case i’m trying to build up a form with about 40 fields.

- 20 of these fields are simple CharText fields
- 10 of these fields are simple DateTime fields
- 10 remaining fields are my dilemma.  
For these last 10 field id like to let the user who’s compiling the form, the possibility to:
- decide the structure of the table ( like: 3 columns. ‘col1’ ‘col2’ ‘col3’  
or 5 columns if he needs to);
- after adding the columns that he needs, he may also add new entries to the previous table.

I’ll post the model base structure.  
( blank lines after ‘=’ means that i don’t know how to fill )  
I need to let the user build his own structure.  
I may build the columns myself, but it’s better to let him create them by choosing their own structure.

class Incarico(models.Model):  
#id = models.AutoField(primary\_key=True)  
nr\_sinistro = models.CharField(max\_length=50, default=None)  
nr\_polizza = models.CharField(max\_length=50, default=None)  
appuntamento\_danno = models.CharField(max\_length=50, default=None)  
note\_pubbliche = models.CharField(max\_length=50, default=None)  
note\_private = models.CharField(max\_length=50, default=None)  
sinistro = models.DateField(default=None)  
incarico = models.DateField(default=None)  
perizia = models.CharField(max\_length=50, default=None)  
pl = models.CharField(max\_length=50, default=None)  
codifiche = models.CharField(max\_length=50, default=None)  
studio = models.CharField(max\_length=50, default=None)  
impiegata =  
perito = models.CharField(max\_length=50, default=None)  
perito\_date = models.DateField(default=None)  
accertatore =  
revisore =  
contatto = models.CharField(max\_length=50, default=None)  
contatto\_date = models.DateField(default=None)  
sopralluogo = models.CharField(max\_length=50, default=None)  
sopralluogo\_date = models.DateField(default=None)  
interloc = models.CharField(max\_length=50, default=None)  
interloc\_date = models.DateField(default=None)  
evasione = models.CharField(max\_length=50, default=None)  
evasione\_date = models.DateField(default=None)  
mandante =  
agenzia =  
ispettorato =  
ramo =  
liquidatore =  
assicurato =  
amministratore =  
broker =  
danneggiati =  
tipologia\_sinistro =  
data\_incarico = models.DateField(default=None)  
note = models.CharField(max\_length=500, default=None)

Thanks in advance!
