Hi there I have to use one unique HTML page to display a few fields that will be populated with some data retrieved from a csv file. I want to use the WTF quick form to pass all the fields together to the HTML page, since I won't know the field names, because they can be retrieved from different csv files(they will be equivalent to the column header of the csv). The only problem is that I want them to be displayed in two columns (div), so half fields in one colums, half in the other, while quick form will show them in a single vertical list. How can I sort this out in the easiest way? any attribute to add to the quick form for the layout?
I have tried the following using wtf.form_field, but in this way I must know the name of each field, and I will have to create one HTML page for each CSV file, while I want to have 1 HTML page with quick form, but I can't have the fields displayed in two columns that way.
<div class="row">
<div class="col-md-6">
{{ wtf.form_field(form.COD_SPORTELLO) }}
{{ wtf.form_field(form.QU_CAP) }}
{{ wtf.form_field(form.QU_CAP_INTER) }}
{{ wtf.form_field(form.CAUSALE) }}
{{ wtf.form_field(form.ONERI_RATE_VAL) }}
{{ wtf.form_field(form.FLAG_ANTIRIC) }}
{{ wtf.form_field(form.FLAG_VIG) }}
</div>
<div class="col-md-6">
{{ wtf.form_field(form.COD_RAPPORTO) }}
{{ wtf.form_field(form.QU_CAP_VALUTA) }}
{{ wtf.form_field(form.DATA_SCADENZA) }}
{{ wtf.form_field(form.ONERI_RATE) }}
{{ wtf.form_field(form.QU_INTER_VALUTA) }}
{{ wtf.form_field(form.FLAG_AR) }}
</div>
</div>
I think it's a bit tricky because even if I pass some parameter to the quick form like horizontal_columns for instance ( Must be a 3-tuple of column-type, left-column-size, right-column-size), it will create a second column, but it will display the fields only one column still, so somehow I have to tell him that I want half of the fields on one column and half on the other column (div). I can't use form_field and list each fileld name cause I won't know the field names.