From aee4205b44f32d9c4e048541396b7eaee14fe912 Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Thu, 4 Apr 2019 05:48:15 +0800 Subject: [PATCH] Fix datatable alias to be a single string (#4231) Credit to @bennothommo --- modules/backend/formwidgets/DataTable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/backend/formwidgets/DataTable.php b/modules/backend/formwidgets/DataTable.php index 7071fafff..40a5609b0 100644 --- a/modules/backend/formwidgets/DataTable.php +++ b/modules/backend/formwidgets/DataTable.php @@ -150,7 +150,7 @@ class DataTable extends FormWidgetBase $config->dataSource = 'client'; if (isset($this->getParentForm()->arrayName)) { - $config->alias = $this->getParentForm()->arrayName . '[' . studly_case(HtmlHelper::nameToId($this->fieldName)) . 'datatable' . ']'; + $config->alias = studly_case(HtmlHelper::nameToId($this->getParentForm()->arrayName . '[' . $this->fieldName . ']')) . 'datatable'; $config->fieldName = $this->getParentForm()->arrayName . '[' . $this->fieldName . ']'; } else { $config->alias = studly_case(HtmlHelper::nameToId($this->fieldName)) . 'datatable';