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.

Customising the CMS /

SS3 customizing CMS - custom ItemEditForm template?


Reply


439 Views

Avatar
ismooth

Community Member, 23 Posts

2 October 2012 at 11:31pm

I have extended model admin to manage my Order dataobject. How can I use my own template for creating new record form? Closest I've achieved is adding order_admin/admin/templates/Includes/LeftAndMain_EditForm.ss template, but then all other modules use this template.

I've noticed that GridFieldDetailForm.ItemEditField() has hardcoded ->setTemplate('LeftAndMain_EditForm.ss') on line 330. Is it possible to override this? If I try to change template for form's GridField in my getEditForm() of my custom model admin, I get blank form, i.e. none of the controls and tags in template get executed (although all of the methods and properties should exist cause it's simply extension of LeftAndMain).

Any other suggestions?