Reputation: 3966
I have a form based on a model. I create a modelformset and need to display many (possibly hundreds) of individual form fields on a single page. I need to reduce the input
size and am achieving this by using this:
widgets = {
'm1_pf': forms.TextInput(attrs={'size':1}),
}
However, this smallest size of 1 is still too big. Is there some other way of accomplishing a data-grid like presentation?
I have looked at using a Datatable with "editable cells" but this will not work for my situation. I need to be able to enter several values quickly by entering the first value, hitting tab, entering the next value, hitting tab, etc. Using the mouse to "click" into each cell and edit it (as is how Datatables works) is out of the question.
Thanks
Upvotes: 0
Views: 312
Reputation: 3966
Nevermind -- I figured it out. I added this to my CSS
sheet:
input {
width: 1px;
}
I am OK with all input tags having this value.
Upvotes: 2