how to use group element and how create table with checkbox
1 answer
Best place to find out about a group widget is create-widget-group
and how to use it, saving-data-widget-group
as for creating a table with checkboxes use an HTML Widget with code that creates HTML for the table:
for example (not real code but gives you the idea)
StringBuilder tbl = new StringBuilder();
tbl.append("<table>");
int iRow = 0;
for(rows){
tbl.append("<tr>");
tbl.append("<td>"); //column 0 the checkbox
tbl.append("<input type=\"checkbox\" id=\"r+iRow.toString\"/>");
tbl.append("</td>");
iRow++;
for(dataColumns){ //other columns for data
tbl.append("<td>");
tbl.append(dataColumn);
tbl.append("</td>");
}
tbl.append("</tr>");
}
tbl.append("</table>");
return tbl.toString();
tbl.append("<table>");
int iRow = 0;
for(rows){
tbl.append("<tr>");
tbl.append("<td>"); //column 0 the checkbox
tbl.append("<input type=\"checkbox\" id=\"r+iRow.toString\"/>");
tbl.append("</td>");
iRow++;
for(dataColumns){ //other columns for data
tbl.append("<td>");
tbl.append(dataColumn);
tbl.append("</td>");
}
tbl.append("</tr>");
}
tbl.append("</table>");
return tbl.toString();
Hope this helps, regards Seán