Skip to content

Matrix column names define child input names. #3024

@snx-jsmyth

Description

@snx-jsmyth

I have a simple matrix below, the column names seem to define the input/textarea names regardless of naming in the Input::make() function.

Matrix::make('units')
    ->columns([
        'Id',
        'Unit',
        'Vlan',
            ])
    ->fields([
        'Id' => Input::make('id'),
        'name' => Input::make('name'),
        'vlan' => Input::make('vlan'),
    ]),

The current code above is what I'd love, however the markup displayed shows the below on the name attributes of the inputs and the data won't display to the correct input.

Image

It would be fantastic if the names to the columns would have zero impact on the output of the mark up of the textareas or inputs when outputted, this would allow database naming conventions while column names could be more human friendly without the need to reindex arrays after requests, this would also provide easier options to run validation against those inputs without once again managing indexing against different model names.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions