By Mike Wacker on
I really like Drupal 6's form to control placement of blocks (Administer => Site Building => Blocks), especially the drag-and-drop interface. I've run into several situations where I would like to make a similar form item.
You have a bunch of items grouped into several groups (in this case regions to place blocks), and you also want to weigh items within the same group, which is where the nice drag-and-drop interfaces comes into the play as opposed to the weight boxes in Drupal 5. Granted it's no longer blocks and block regions, but I essentially am making the same type of form.
Is it easy to replicate the same type of form item in other scenarios, or would it take me a lot of work?
Comments
It took me awhile to learn
It took me awhile to learn how to use the tabledrag functionality. There are some modules around that might help, but basically you include a theme function for your form that does this.
I implemented it for my module which had some unique issues so keep that in mind (http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/og_titles/o...). See og_titles_group_settings and theme_og_titles_group_settings.
This was after several hours of searching for tabledrag in google and reading a couple of blogs and the menu implementation.