Can you make columns display vertically?
My infolist currently has 4 textEntry items:
Section::make('Customer details')
->columns(2)
->schema([
TextEntry::make('Item 1'),
TextEntry::make('Item 2'),
TextEntry::make('Item 3'),
TextEntry::make('Item 4'),
])
...and it displays like this
+--------+---------+
| Item 1 | Item 2 |
+--------+---------+
| Item 3 | Item 4 |
+--------+---------+
Is there a way without rearranging the order of the items to make them stack vertically instead of horizontally?
i.e.
+--------+---------+
| Item 1 | Item 3 |
+--------+---------+
| Item 2 | Item 4 |
+--------+---------+
Section::make('Customer details')
->columns(2)
->schema([
TextEntry::make('Item 1'),
TextEntry::make('Item 2'),
TextEntry::make('Item 3'),
TextEntry::make('Item 4'),
])
...and it displays like this
+--------+---------+
| Item 1 | Item 2 |
+--------+---------+
| Item 3 | Item 4 |
+--------+---------+
Is there a way without rearranging the order of the items to make them stack vertically instead of horizontally?
i.e.
+--------+---------+
| Item 1 | Item 3 |
+--------+---------+
| Item 2 | Item 4 |
+--------+---------+
Solution
Ah this works:
Section::make('Customer details')
->columns(2)
->schema([
Grid::make(1)
->columns(1)
->schema([
TextEntry::make('Item 1'),
TextEntry::make('Item 2'),
]),
Grid::make(1)
->columns(1)
->schema([
TextEntry::make('Item 3'),
TextEntry::make('Item 4')
])
])
Section::make('Customer details')
->columns(2)
->schema([
Grid::make(1)
->columns(1)
->schema([
TextEntry::make('Item 1'),
TextEntry::make('Item 2'),
]),
Grid::make(1)
->columns(1)
->schema([
TextEntry::make('Item 3'),
TextEntry::make('Item 4')
])
])