I want to remove the "Add ..." Button from the CMS display for a page that belongs to a many-many relationship. I only want someone to be able to click the checkbox to associate the Model object, but not create a new Model object from this page.
I'm calling it like this:
$modulesTablefield = new ManyManyComplexTableField(
$this,
'Modules',
'Module',
array(
'Title' => 'Title',
'Headline' => 'Headline'
),
'getCMSFields_forPopup'
);
$fields->addFieldToTab('Root.Content.Module',$modulesTablefield);
EDIT
Adding the following code to the page controller removes the add button.
$modulesTablefield->setPermissions(array(
'view'
));
Chris.b