Hi guys, I'm trying to update a site I manage to Drupal 4.7-beta4. I've made a few custom modules, one of which implemented a form mixed into a table. The old code looked like this:
$db_hours_query = db_query('...query...', $node_data->nid);
while ($db_hours = db_fetch_array($db_hours_query)) {
$user_select[$db_hours['row_num']] = $db_hours['uid'];
$service_hours[$db_hours['row_num']] = $db_hours['service_hours'];
$fellowship_hours[$db_hours['row_num']] = $db_hours['fellow_hours'];
$fundraiser_hours[$db_hours['row_num']] = $db_hours['fund_hours'];
$ritual_req[$db_hours['row_num']] = $db_hours['ritual'];
}
In here a select field is generated, but I'm switching to a textfield with 4.7's autocomplete feature, so it's not really relevant.
<?php
$header = array(t('#'), t('Member'), t('Service Hrs'), t('Fellowship Hrs'), t('Fundraiser Hrs'), t('Ritual Req.'));
$rows = array();
for($i = 1; $i <= $total_slots; $i++) {
$rows[] = array(
'data' => array(
($error[$i] ? theme('image', 'misc/watchdog-error.png', t('error'), t('error')) : t($i)),
form_select('', 'user_select]['.$i, ($user_select[$i] != 'select' ? $user_select[$i] : 'Select a Member'), $user_options),
form_textfield('', 'service_hours]['.$i, (($service_hours[$i] && $user_select[$i] != 'select') ? $service_hours[$i] : ''), 5, 5),
form_textfield('', 'fellowship_hours]['.$i, (($fellowship_hours[$i] && $user_select[$i] != 'select') ? $fellowship_hours[$i] : ''), 5, 5),