5102 Posts in 1520 Topics by 1116 members
| Go to End | ||
| Author | Topic: | 3207 Views |
-
Re: Using FieldGroup and customizing field layout in ModelAdmin

3 March 2011 at 9:34am
Got it
Again, Swaiba...Thank u so much
-
Re: Using FieldGroup and customizing field layout in ModelAdmin

3 March 2011 at 10:17am
you're welcome
-
Re: Using FieldGroup and customizing field layout in ModelAdmin

16 March 2011 at 5:27am
Swaiba, need your (or anybody else )help again..
I'm trying to do this;
$fields->addFieldToTab("Root.MedRecords", $fields->insertBefore(new LiteralField('NameFieldGroup'.'Patella','<div class="NameFieldGroup">'),'HD');
$fields->addFieldToTab("Root.MedRecords", $fields->insertAfter(new LiteralField('NameFieldGroup'.'Patella','<div class="NameFieldGroup">'),'DNA');
Well...that doesn't workMy MedRecords are a different DataObject than the one i'm creating the Tab in. The 'Patella' , 'HD' and 'DNA' are fields in my MedRecords.
any ideas on this one ?
-
Re: Using FieldGroup and customizing field layout in ModelAdmin

30 March 2011 at 11:39pm
Hi Stefdv,
I think what you need is just:
$fields->addFieldToTab("Root.MedRecords", new LiteralField('NameFieldGroup'.'Patella','<div class="NameFieldGroup">'),'HD');
Which will insert the field before the 'HD' field under MedRecords tab.
Hope that helps,
Aram
| 3207 Views | ||
| Go to Top |



