Okay. I've got a site. The site has a big legacy database of book reviews with a seriously mangled and crufty back-end. I load the data into a database, and set up a little Drupal module to query it and show pretty results. Yay. Now, to work on a little interface to edit/submit book reviews. (The reviews are submitted by email to one of the site's administrators, who then uploads them.) Drupal's form API comes to the rescue. Yayness! I have a mostly-working form in moments.
Problem. Book reviews have book authors. That is authors, plural. An arbitrary number of authors. (In practice, no more than 6). We also have book reviewers (never any more than 2 of those, though). I need to get these authors names' into the database.
So. How does one handle this sort of a setup? It's easy enough to set up a select box with the MULTIPLE attribute -- in fact, I've already done it, for some subject/geographic/time period codes associated with the reviews -- but that's for a mostly fixed set of codes; most reviews have a totally unique author.
I suppose I could create some fixed number of text fields and number them 1 to 6 (and hope we have no more than 6 authors). But I'm hoping for a better way... I have an idea for a terribly ugly little hack using JavaScript and a multiple-select element, but I'm not to happy with that, either.