Skip to content

Filament plugin that allows to add dynamic, user-defined form fields, enhancing the customization and functionality of admin panels.

License

Notifications You must be signed in to change notification settings

shopperlabs/custom-fields

 
 

Repository files navigation

Custom Fields

License Laravel 12 PHP 8.3 License

A powerful Laravel/Filament plugin for adding dynamic custom fields to any Eloquent model without database migrations.

✨ Features

  • 18+ Field Types - Text, number, date, select, rich editor, and more
  • Conditional Visibility - Show/hide fields based on other field values
  • Multi-tenancy - Complete tenant isolation and context management
  • Filament Integration - Forms, tables, infolists, and admin interface
  • Import/Export - Built-in CSV capabilities
  • Security - Optional field encryption and type-safe validation
  • Extensible - Custom field types and automatic discovery (coming soon)

🔧 Requirements

  • PHP 8.1+
  • Laravel via Filament 3.0+

🚀 Quick Start

Installation

composer require relaticle/custom-fields
php artisan custom-fields:install

Integrating Custom Fields Plugin into a panel

use Relaticle\CustomFields\CustomFieldsPlugin;
use Filament\Panel;

public function panel(Panel $panel): Panel
{
    return $panel
        // ... other panel configurations
        ->plugins([
            CustomFieldsPlugin::make(),
        ]);
}

Setting Up the Model

Add the trait to your model:

use Relaticle\CustomFields\Models\Contracts\HasCustomFields;
use Relaticle\CustomFields\Models\Concerns\UsesCustomFields;

class Post extends Model implements HasCustomFields
{
    use UsesCustomFields;
}

Add to your Filament form:

use Relaticle\CustomFields\Filament\Forms\Components\CustomFieldsComponent;

public function form(Form $form): Form
{
    return $form->schema([
        // Your existing form fields...
        CustomFieldsComponent::make()->columns(1),
    ]);
}

📚 Documentation

Full documentation and examples: https://custom-fields.relaticle.com/

🤝 Contributing

Contributions welcome! Please see our contributing guide.

📄 Licensing

This plugin is dual-licensed: Open Source (AGPL-3.0) for open source projects, and Commercial License for closed-source projects.

AGPL-3.0 requires your entire application to be open source. For private/closed-source projects, you need a commercial license.

More Information: License Details

About

Filament plugin that allows to add dynamic, user-defined form fields, enhancing the customization and functionality of admin panels.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 97.9%
  • Blade 1.6%
  • Other 0.5%