#19054hook before_render a single field in tceforms
Description
adds a hook in function “getSingleField_SW” before rendering of single fields in tceforms.
the hook can be used to add addtional config options in the tca array, to in influence the rendering of the field.
i used it to render some fields “readOnly” based on logged in be_user. ex:
function getSingleField_beforeRender($table,$field,$row,&$PA) {
if (is_array($PA[‘fieldConf’][‘config’][‘readOnlyGroups’])) {
if (count(array_intersect($PA[‘fieldConf’][‘config’][‘readOnlyGroups’], $GLOBALS[‘BE_USER’]->userGroupsUID))>0) {
$PA[‘fieldConf’][‘config’][‘readOnly’] = true;
}
}
}
pending in core list
(issue imported from #M8890)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.