[Solved] fieldgroup options in delegate class ?

A place for users and developers of the Xataface to discuss and receive support.

[Solved] fieldgroup options in delegate class ?

Postby 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.
Last edited by silma on Wed Nov 18, 2009 5:48 am, edited 1 time in total.
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm

Postby 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;
    }
}

shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby silma » Wed Nov 18, 2009 3:00 am

That works perfectly well.

Thanks a lot !
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 16 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved