contao/test — Issue #901: Add 'readonly' => true as a Widget attribute
Author: importer
Created: 2011-11-29 06:59:47+00:00
State: open
Labels: Feature, framework

This will allow textfields to be visible, text-selectable, but not editable. The 'disabled' => true attribute, which is currently supported in the Widget class, doesn't allow the field contents to be selected. You can either implement this in Widget or simply in TextField.php in its setter method (as its related only to INPUT text/passwords.

Its better to just add a line into the widget as a multiple condition for disabled:

```
case 'readonly':
case 'disabled':
$this->arrAttributes[$strKey] = $varValue;
$this->blnSubmitInput = false;
break;

```

--- _Originally created by thyon on July 22nd, 2009, at 09:21am (ID 901)_