Field Group 💯
In some cases, you need to group multiple fields together. You can achieve this using the FieldGroup class. Here's an example:
php
FieldGroup::init([
TextField::init('name', 'Product Name'),
TextField::init('detail', 'Product Detail'),
TextField::init('source', 'Product Source'),
], 'Group')
->setLayoutClass('col-12'),
This example demonstrates how to create a group of fields. The FieldGroup::init method takes an array of fields and an optional group label. The setLayoutClass method allows you to define the CSS class for the layout of the group.