I've created a form that has the following structure
function myfunction(){
$form['myform']['row1']['field1'] = array(
//type, title, etc.
);
$form['myform']['row1']['field2'] = array(
//type, title, etc.
);
$form['myform']['row1']['field3'] = array(
//type, title, etc.
);
$form['myform']['row2']['field1'] = array(
//type, title, etc.
);
$form['myform']['row2']['field2'] = array(
//type, title, etc.
);
$form['myform']['row2']['field3'] = array(
//type, title, etc.
);
}
but I'd like to render it as a table in the following format with a head row if possible.
Col 1 Col 2 Col 3
----------------------------------------------------------------------
Row 1 Field 1 Field 2 Field 3
Row 2 Field 1 Field 2 Field 3
Row 3 Field 1 Field 2 Field 3
What format should I follow to get Drupal to render the form as a table?
P.S. Col 1 = select
, Col 2 = checkbox
, Col 3 = texfield
and the very first column is the row #
Row1, Row2, Row3
.
Edit: doesn't drupal have something that you could give it a form and it will automatically produce that colored row, white row look?