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   1984 Views

Avatar
Mohan

Community Member, 19 Posts

20 May 2008 at 11:10pm

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

Cheers!

Avatar
dio5

Community Member, 501 Posts

21 May 2008 at 12:03am

$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

Community Member, 19 Posts

21 May 2008 at 12:17am

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

Community Member, 501 Posts

21 May 2008 at 12:20am

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.