<%
int cf = conf.getCustomFieldNumber();
int bn = 0, count = 0; // bn for the break number
if (cf > 8) { // for field number of 9,10,11,12
bn = cf/3;
} else if (cf > 4) { // for field number of 5,6,7,8
bn = cf/2;
}
for (int i=1; i<=CUSTOM_FIELDS; i++) {
String fieldName = "field_"+i;
if( (field=conf.getField(fieldName)) != null && (optionList=field.getValue()) != null) {
%>
<% if (field.isTextField()) { %>
<%=label.get(fieldName, projectId)%>¹
<% } else { %>
<%=label.get(fieldName, projectId)%>
<% }
count++;
if (count == bn) {
cf -= bn;
if (cf >= 2*bn) {
bn = cf/2;
} else {
bn = cf;
}
count = 0; // reset the count
if (cf > 0) { //start a new table.
out.println("