linhntaim/advanced-fields

Advanced Fields for Filament's Form Builders.
6 1
Install
composer require linhntaim/advanced-fields
Latest Version:1.0.3
PHP:^8.2
License:MIT
Last Updated:Feb 11, 2026
Links: GitHub  ·  Packagist
Maintainer: linhntaim

Advanced Fields for Filament's Form Builders

Latest Version on Packagist Total Downloads

Multiple Choice Grid/Radio Grid, Checkbox Grid, ... and more.

Installation

You can install the package via composer:

composer require linhntaim/advanced-fields

Optionally, you can publish the views using

php artisan vendor:publish --tag="advanced-fields-views"

Usage

Grid Fields

Supports: RadioGrid, CheckboxGrid.

use Filament\Schemas\Schema;
use LinhntAim\AdvancedFields\RadioGrid;
use LinhntAim\AdvancedFields\CheckboxGrid;

public function mount(): void
{
    $this->form->fill([

        // format of the state used for RadioGrid
        'filled_radio_grid' => [
            'row_1' => 'column_c',
            'row_2' => 'column_b',
            'row_3' => 'column_a',
        ],

        // format of the state used for CheckboxGrid
        'filled_checkbox_grid' => [
            'row_1' => [
                'column_c',
                'column_a',
            ],
            'row_2' => [
                'column_b',
                'column_c',
            ],
            'row_3' => [
                'column_a',
                'column_b',
            ],
        ],

    ]);
}

public function form(Schema $schema): Schema
{
    return $schema->components([

        ...,

        RadioGrid::make('radio_grid')
            ->options([
                'column_a' => 'Column A',
                'column_b' => 'Column B',
                'column_c' => 'Column C',
            ])
            ->rows([
                'row_1' => 'Row 1',
                'row_2' => 'Row 2',
                'row_3' => 'Row 3',
            ])
            // optionally, (one) radio must be checked in each row
            ->required()
            // optionally, disable specific column option(s)
            ->disableOptionWhen(fn($value) => $value == 'column_b')
            // optionally, set the label of the "Clear selection" button
            // - note: the button will be shown after checking any radio if not required
            ->clearButtonLabel('X'),

        ...,

        CheckboxGrid::make('checkbox_grid')
            ->options([
                'column_a' => 'Column A',
                'column_b' => 'Column B',
                'column_c' => 'Column C',
            ])
            ->rows([
                'row_1' => 'Row 1',
                'row_2' => 'Row 2',
                'row_3' => 'Row 3',
            ])
            // optionally, at least one checkbox must be checked in each row 
            ->required()
            // optionally, disable specific column option(s)
            ->disableOptionWhen(fn($value) => $value == 'column_b'),

        ...,

    ]);
}


Sample light theme

Sample dark theme

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.

Related Packages

helmut/forms

A customisable and testable form abstraction library.

19 0
lbcdev/filament-maps-fields

A Filament package providing map field components for forms and infolists using...

0 0
novius/laravel-filament-slug

A Laravel Filament Forms slug field.

2,219 2