Open zonky2 opened 4 years ago
It already works in Contao 4.9, MCW 3.4.9
for all widgets?
The question is which fields support this feature in Contao itself? This is not clear @Documentation https://docs.contao.org/dev/reference/dca/fields/#reference
I tested it with several field types. It works with text, textarea, inputUnit and textStore.
It does not work with select, checkbox, imageSize, checkboxWizard, radio, pageTree, fileTree. But I think this also does not work in Contao standard fields.
Ahh! I thought about it again - I didn't mean readonly for the individual widgets, but readonly for the MCW. This of course includes that the individual widgets can be set readonly....
Okay, I tested it. It works. You can add new lines, but these won't be saved. This is the same procedure in several other Contao fields like inputType => list et cetera.
This is no bug imo.
post your config...
Btw. changes in existing lines won't be saved also.
$GLOBALS['TL_DCA'][$strTblName]['fields']['mcwtest222'] = array
(
'exclude' => true,
'inputType' => 'multiColumnWizard',
'eval' => array
(
//'columnsCallback' => array('tl_mcw_test', 'getTestFields'),
'readonly' => true,
'columnFields' => array
(
'text' => array
(
'label' => 'text',
'default' => 'Bla',
'inputType' => 'text',
'eval' => array('maxlength'=>5, 'style'=>'width:50px') //, 'nospace'=>true, 'trailingSlash'=>true
)
),
),
'sql' => "blob NULL"
);
it´s possible to add attribute readonly?
e.g. for MetaModels/attribute_tabletext#7
see https://github.com/menatwork/MultiColumnWizard/issues/214