if ($system == 'complex') {
$row = array(
form_textfield('', 'ingredients]['.$id.'][quantity', $ingredient->quantity, 8, 8),
form_select('', 'ingredients]['.$id.'][unit_id', $ingredient->unit_id, recipe_unit_options()),
form_autocomplete('', 'ingredients]['.$id.'][name', $ingredient->name, 32, 32, $callback)
);
}
But it's from a module for Drupal. I couldn't get it to work with 4.6 or 4.7, but there is a web site that attempts to update 4.6 code to 4.7 in regards to forms.
I ran the original code through that, and copied and pasted the appropriate sections as indicated.
http://www.lullabot.com/formupdater |