mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Set unique name for AddNewMultiClass Selects
fixing wrong behaviour when having multiple Gridfields containing AddNewMultiClass Selects on one form
This commit is contained in:
parent
e62422fdb3
commit
5c1f9cca01
@ -188,7 +188,8 @@ class GridFieldAddNewMultiClass implements GridField_HTMLProvider, GridField_URL
|
||||
|
||||
GridFieldExtensions::include_requirements();
|
||||
|
||||
$field = new DropdownField(sprintf('%s[ClassName]', __CLASS__), '', $classes, $this->defaultClass);
|
||||
|
||||
$field = new DropdownField(sprintf('%s[%s]', __CLASS__, $grid->getName()), '', $classes, $this->defaultClass);
|
||||
if (Config::inst()->get('GridFieldAddNewMultiClass', 'showEmptyString')) {
|
||||
$field->setEmptyString(_t('GridFieldExtensions.SELECTTYPETOCREATE', '(Select type to create)'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user