[symfony-users] ahDoctrineEasyEmbeddedRelationsPlugin : how to hide some form widgets

2010-02-17 Thread Mikael
Hello, I've installed the ahDoctrineEasyEmbeddedRelationsPlugin and set it up to manage Eth records linked to Pc ones. On the pc backend module, I've configured the form to only show some widgets (because pc inherits from Obj which many useless fields in the context of a pc). This gives us this

Re: [symfony-users] ahDoctrineEasyEmbeddedRelationsPlugin : how to hide some form widgets

2010-02-17 Thread Daniel Lohse
Hey there, there's only one way I can of, which you probably won't like. Just configure all the fields directly in the form. :) So, delete the form: display: key and just create another form inheriting from the form you are probably already using elsewhere and use $this-useFields() before

Re: [symfony-users] ahDoctrineEasyEmbeddedRelationsPlugin : how to hide some form widgets

2010-02-17 Thread Stéphane
Hi, In the BaseDoctrineForm, in the ::configure() method, I've coded something like this: $aConditions = array('ajax'=isAjax ? 'ajax:false, 'new'= isNew ? 'new': false, 'embedded'=isEmbedded?'embedded':false, ); $method = sprintf('_computeFields%s%s%s', $aConds['ajax'], $aConds['new'],