Skip to content

Commit

Permalink
Table: Add Max Columns & Max Rows config options
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Dec 6, 2024
1 parent ed9161d commit 6a0021c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resources/lang/en/fieldtypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@
'slug.config.show_regenerate' => 'Show the regenerate button to re-slugify from the target field.',
'slug.title' => 'Slug',
'structures.title' => 'Structures',
'table.config.max_columns' => 'Set a maximum number of columns.',
'table.config.max_rows' => 'Set a maximum number of rows.',
'table.title' => 'Table',
'taggable.config.options' => 'Provide pre-defined tags that can be selected.',
'taggable.config.placeholder' => 'Type and press ↩ Enter',
Expand Down
10 changes: 10 additions & 0 deletions src/Fieldtypes/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ protected function configFieldItems(): array
'instructions' => __('statamic::messages.fields_default_instructions'),
'type' => 'table',
],
'max_rows' => [
'display' => __('Max Columns'),
'instructions' => __('statamic::fieldtypes.table.config.max_rows'),
'type' => 'integer',
],
'max_columns' => [
'display' => __('Max Columns'),
'instructions' => __('statamic::fieldtypes.table.config.max_columns'),
'type' => 'integer',
],
];
}

Expand Down

0 comments on commit 6a0021c

Please sign in to comment.