Is there a recommended method to construct a form on a grid (2-dimensional array) with Form API? Possible Duplicate:
  Theme Drupal Form API checkboxes as a grid  




I would like to create a form that is able to accept values which will be saved into a multidimensional array. Is there an advised method on how to accomplish this with Form API?

As an example:

  |  A  |  B  |  C  |
--+-----+-----+-----+
1 |     |     |     |
--+-----+-----+-----+
2 |     |     |     |
--+-----+-----+-----+
3 |     |     |     |
--+-----+-----+-----+


I would like to have a textfield for each grid square and save the end value into a single array which will be serialized and saved as a variable.

EDIT: Just to clarify, I don't particular care if the form is output as a TABLE in a HTML sense, but it would obviously be nice to have it stored as a multidimensional array from a PHP perspective.
If you need a table and put checkboxes on the left you could use http://heine.familiedeelstra.com/new-tableselect-form-element-in-core

Alternative you could theme your form. Therefore you have to write a theme_form_id which
drupal_render the elements and put them together with theme('table').

PS: This will perhaps land in drupal8: http://drupal.org/node/80855