silverstripe / gridfielddetailformwithsearch
GridFieldDetailForm that has a search sidebar always visible
Installs: 3 146
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 7
Forks: 4
Open Issues: 3
Type:silverstripe-module
Requires
- silverstripe/framework: ^3.1.0
This package is auto-updated.
Last update: 2024-07-10 21:54:51 UTC
README
Grid Field Detail Form that has a search sidebar always visible. Note that we just need to modify the item_request, not the whole GridFieldDetailForm. Usage:
class MyDataObjectAdmin extends ModelAdmin {
static $managed_models = array(
'MyDataObject'
);
public function getEditForm($id = null, $fields = null) {
$form = parent::getEditForm($id, $fields);
$config = $form->Fields()->first()->getConfig();
$config->getComponentByType('GridFieldDetailForm')
->setItemRequestClass('GridFieldDetailFormWithSearch_ItemRequest')
->setTemplate('GridFieldDetailFormWithSearch');
return $form;
}
}