tabledrag_example_parent_form.inc
function theme_tabledrag_example_parent_form
Lines 191+
// Add our hidden 'id' column.
drupal_render($form['example_items'][$id]['id']),
// Add our hidden 'parent id' column.
drupal_render($form['example_items'][$id]['pid']),
This will make show-hide rows link work only on pid. Usually we don't want any numerical data displayed to end user, so it should be:
// Add our hidden 'id' and 'parent' column.
// Both in one column, because 'Show row weights' will only support one.
drupal_render($form['example_items'][$id]['id']) . drupal_render($form['example_items'][$id]['pid']),
And of course in $header we would need to change t('ID'), t('PID') to t('ID & PID')
Or at least describe better why ID does not get hidden.
Comments
Comment #1
mile23It seems to me the reason we show ID and PID is so the user can easily see the relationship between them, and also edit the PID. I think the relationship is clearer if they each have their own column in the table.