contao/issues — Issue #116: SelectAll checkbox option for PageTree/FileTree
Author: importer
Created: 2011-11-24 12:14:43+00:00
State: open
Labels: backend, Feature

I've recently finished a TableTree widget, and I thought it might be useful to have a "reset" function similar to the existing ones in PageTree and FileTree for radio mode, but for checkbox mode. This will check/uncheck all the checkboxes in the tree.

My code snippet is basically similar to the reset function but the checkboxes must be of type tl_checkbox instead of tl_tree_checkbox (or you can write another function to check these classes instead).

```
// Select ALL checkbox selection
if ($GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['eval']['fieldType'] == 'checkbox')
{
$strReset = "\n" . '

'.$GLOBALS['TL_LANG']['MSC']['selectAll'].'

';
}

```

Perhaps it would also help to have these functions optional, e.g.
['eval']['enableReset'] => true/false. this will enable/disable this line at the bottom of the PageTree and FileTree controls.

--- _Originally created by thyon on September 21st, 2008, at 03:51pm (ID 116)_