I am updating a draggable form from drupal 6 to 7. If i change the value of weight on the select box, it changes and saves it, but if i drag and drop, it do not change the value. I found some samples, but they are only for drupal 6, where it works, i have made some changes from drupal 6 and it is as this, the full file is at http://drupalcode.org/viewvc/drupal/contributions/modules/customfilter/c...
This is the only thing left to a drupal 7 version, and any help/tip is welcome, thanks.
function theme_customfilter_rules_form($vars) {
$form = $vars['form'];
$rows = array();
if (isset($form['rules'])) {
foreach (element_children($form['rules']) as $rid) {
$row = array();
$element = &$form['rules'][$rid];
$element['prid']['#attributes']['class'] = 'rule-prid';
$element['rid']['#attributes']['class'] = 'rule-rid';
$element['weight']['#attributes']['class'] = 'rule-weight';
$row[] = (
// @todo Fix this for indentation
//theme('indentation', $element['level']['#value']) .
$element['name']['#value']
);
$row[] = (
drupal_render($element['rid']) .
drupal_render($element['prid']) .
drupal_render($element['weight'])
);
$row[] = drupal_render($element['enabled']);