Silverstripe Version: 4*
Question:
Sorry for the “wild” topic title.
I’m adding a custom “info” field to member edit view. I want to populate it with a custom query.
I need to get the ID of the member I am currently viewing (not my ID).
silverstripe/admin/security/EditForm/field/Members/item/7/edit
Additionally I want to make this field “disabled”.
class MyMemberExtension extends DataExtension
{
public function updateCMSFields(FieldList $fields)
{
// Can I make this field disabled? It won't save but just so there is no confusion
$fields->push(new TextField('AllAppsForUser','List of users apps',$this->getAllAppsForUser()));
}
private function getAllAppsForUser() {
// I need the ID of the member I am viewing for a query. I From url example that would be 7
return $list;
}
}