Hi,
can anyone guide me on how to remove the add method in ComplexTableField?
Cheers!
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hi,
can anyone guide me on how to remove the add method in ComplexTableField?
Cheers!
$yourTable->setPermissions(array('delete', 'edit'));
although I'm not 100% sure this works on a complextablefield as well, but it's inherited so it should.
Thanks very much dio5!
It worked like a charm.
I got one more question, is there a way to have a search functionality
in ComplexTableFiled?
Again, thanks a lot and appreciate for your quick reply.
Thanks!
Mohan
Well, yes you can, but you'll need to subclass ComplexTableField and add it to it.
Not the easiest, but not undoable either.
Have a look at cms/code/MemberTableField.php for an example of this.