I have built a fairly basic module but i'm struggling with the UX of the admin form. Essentially I need a list of items that have several values; a textfield, checkbox, select list and a button to delete them.
I've built all of the functionality (including the "add one more" using the example in the drupal ajax examples module) and its working great, except now I need to be able to reorder the items and the webmin style up/down buttons are not good UX. I've been hacking to no avail at numerous examples like: http://www.urbaninsight.com/2012/09/11/creating-table-with-draggable-weights-in-drupal-7
It doesn't appear that theme_hook_form
is being called so I can't inject the weight javascript, styles or markup.
I added this to the .module file:
function module_cache_theme() {
dpm("themehook");
return array(
'theme_module_settings_form' => array(
'file' => 'module_form.inc',
'arguments' => array('form' => NULL),
),
);
}
The menu item is in the hook_menu:
$items['admin/config/development/module'] = array(
'title' => 'module',
'description' =>'',
'page callback' => 'drupal_get_form',
'page arguments' => array('module_settings_form'),
'access arguments' => array('administer site configuration'),
'file' => 'module_form.inc',
);
When the cache is regenerated I get a dpm message but the method theme_module_settings_form
is never being triggered.
Ideas?