We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5.2
setReadonly(true) does not work on a checkboxField (and potentially others).
Take a DataObject with a bunch of fields and then run:
foreach (array_keys($this->config()->get('db')) as $readonlyField) { $formFieldTmp = $fields->dataFieldByName($readonlyField); if ($formFieldTmp) { $formFieldTmp->setDescription('set to readonly'); $fields->replaceField($readonlyField, $formFieldTmp->setReadonly(true)); } }
and for each field asses it it acts and looks and feels as readonly
implement properly across of fields OR, use performReadonlyTransformation instead.
What would be nice if you could simply write:
$fields->dataFieldByName('MyBooleanField')->setReadonly(true)
and it would actually change, rather than having to replace the original field.
silverstripe/installer
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Module version(s) affected
5.2
Description
setReadonly(true) does not work on a checkboxField (and potentially others).
How to reproduce
Take a DataObject with a bunch of fields and then run:
and for each field asses it it acts and looks and feels as readonly
Possible Solution
implement properly across of fields OR, use performReadonlyTransformation instead.
Additional Context
What would be nice if you could simply write:
and it would actually change, rather than having to replace the original field.
Validations
silverstripe/installer
(with any code examples you've provided)The text was updated successfully, but these errors were encountered: