Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Remove add method in ComplexTableField


Reply

4 Posts   1946 Views

Avatar
Mohan

20 May 2008 at 11:10pm Community Member, 19 Posts

Hi,
can anyone guide me on how to remove the add method in ComplexTableField?

Cheers!

Avatar
dio5

21 May 2008 at 12:03am Community Member, 501 Posts

$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.

Avatar
Mohan

21 May 2008 at 12:17am Community Member, 19 Posts

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

Avatar
dio5

21 May 2008 at 12:20am Community Member, 501 Posts

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.