Dis or Dat
Categories
Component ID
1251516
Component name
Dis or Dat
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Component created
Component changed
Component body
Sup yall! Dis herr module dun give yall uh form element dat gives you uh drag 'n' drop bling fo' uh list o' #options. Rly though, it's jus' checkboxes, but draggin' uh item 'tween da "Active" an' "Inactive" column will toggle da checkbox value fo realz yall.
Update: Dis or Dat now is uh field widget too.
Look herr:
$form['muh_elument'] = array(
'#title' => "Muh Elument",
'#type' => 'dis_or_dat',
'#options' => drupal_map_assoc(array('A', 'B', 'C', 'D', 'E', 'F', 'G')),
);
If you turn off javascript the form element renders as uh list o' checkboxes.
For more advanced uses you can add #sortable_{library_option}, like do what I done herr:
$form['more_better_element'] = array(
'#title' => 'More Better Element',
'#type' => 'dis_or_dat',
'#options' => drupal_map_assoc(array('X', 'Y', 'Z')),
'#sortable_revert' => FALSE,
'#sortable_cursor' => 'no-drop',
'#sortable_delay' => 200,
);
I realize that the form element's theme is fugly. It's already a @todo :)
