Skip to content

Datatable wrong data-field-name if field name with key, and data dont save  #117

Description

@Trysystems

Datatable widget generates wrong attribute data-field-name. In my case, I extend form with fields with keys (data[1][row], data[2][row]), and widget generates name "Report[data[1][row]]". It's because of logic on 155 string at DataTable.php file.

Temporary fix it with change string to
$config->fieldName = $this->getParentForm()->arrayName.'['.implode('][', HtmlHelper::nameToArray($this->fieldName)).']';

I took logic from FormField class.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs responseIssues/PRs where a maintainer is awaiting a response from the submitterstaleIssues/PRs that have had no activity and may be archived

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions