function theme_filefield_current in FileField 5
1 theme call to theme_filefield_current()
File
- ./
filefield.module, line 412 - Defines a file field type.
Code
function theme_filefield_current(&$form) {
$header = array(
t('Type'),
t('Description'),
t('Size'),
t('List'),
t('Delete'),
);
foreach (element_children($form) as $key) {
//drupal_set_message($key);
//only display numerically keyed fields in form.
//numeric key == $delta
if (is_numeric($key) && !$form[$key]['remove']['#value']) {
$row = array();
$row[] = drupal_render($form[$key]['icon']);
$row[] = drupal_render($form[$key]['description']);
$row[] = drupal_render($form[$key]['size']);
$row[] = drupal_render($form[$key]['list']);
$row[] = drupal_render($form[$key]['remove']);
$rows[] = $row;
}
}
if (count($rows)) {
$output = theme('table', $header, $rows);
}
$output .= drupal_render($form);
return $output;
}