[Solved] fieldgroup options in delegate class ?
Archived from the Xataface Users forum.
silma — Mon Nov 16, 2009 3:49 am
Hello,
I’m looking for a way to collapse (or not) one of my fieldgroup depending on some value.
Is there a function “myfieldgroup__collapsed” like there is a “myfield__default” one ?
Thanks a lot for you help.
shannah — Mon Nov 16, 2009 4:36 pm
You could do this inside the init() method of the delegate class I suppose.
eg.
- Code: Select all
function init(&$table){ $fieldgroup =& $table->getFieldGroup('mygroup'); $record =& Dataface_Application::getInstance()->getRecord(); if ( $record->val("foo") == 'bar' ){ $fieldgroup['collapsed'] = 1; } }
silma — Wed Nov 18, 2009 3:00 am
That works perfectly well.
Thanks a lot !