I'd like to do a number of small customizations on the ModelAdmin.
I'd like to change the text on the 'Add' button to one that is different from the original DataModel.
I have a has_many relationship. I'd like to hide the ability to 'link to existing' so that one cannot search for other 'skills' as per below.
I have the following in the Model:
public function getCMSFields() {
...
$characterSkillsField = new GridField(
'CharacterSkills',
'Character Skills',
$this->CharacterSkills(),
GridFieldConfig_RelationEditor::create()
);
$fields->addFieldToTab('Root.CharacterSkills', $characterSkillsField);
...
}
ANSWER to #2:
// Add the relation editor.
$config = GridFieldConfig_RelationEditor::create();
// Remove the ability to search and link to other skills.
$config->removeComponentsByType('GridFieldAddExistingAutocompleter');
$characterSkillsField = new GridField( 'CharacterSkills', 'Character Skills', $this->CharacterSkills(), $config );