https://github.com/relaticle/custom-fields
Filament plugin that allows to add dynamic, user-defined form fields, enhancing the customization and functionality of admin panels.
https://github.com/relaticle/custom-fields
custom-fields data-model dynamic-fields filament form-builder laravel-package multi-tenancy plugin
Last synced: about 1 month ago
JSON representation
Filament plugin that allows to add dynamic, user-defined form fields, enhancing the customization and functionality of admin panels.
- Host: GitHub
- URL: https://github.com/relaticle/custom-fields
- Owner: Relaticle
- License: agpl-3.0
- Created: 2024-09-11T16:29:11.000Z (over 1 year ago)
- Default Branch: 2.x
- Last Pushed: 2026-02-09T15:17:26.000Z (about 2 months ago)
- Last Synced: 2026-02-09T21:36:26.847Z (about 2 months ago)
- Topics: custom-fields, data-model, dynamic-fields, filament, form-builder, laravel-package, multi-tenancy, plugin
- Language: PHP
- Homepage: https://relaticle.github.io/custom-fields/
- Size: 11.7 MB
- Stars: 150
- Watchers: 3
- Forks: 20
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

A powerful Laravel/Filament plugin for adding dynamic custom fields to any Eloquent model without database migrations.
## Features
- **20+ Field Types** - Text, date, select, file upload, 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
## Requirements
- PHP 8.3+
- Laravel via Filament 4.0+
## Getting Started
### Integrating Custom Fields Plugin into a panel
```php
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:
```php
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:
```php
use Filament\Schemas\Schema;
use Relaticle\CustomFields\Facades\CustomFields;
public function form(Schema $schema): Form
{
return $schema->components([
// Your existing form fields...
CustomFields::form()->forSchema($schema)->build()
]);
}
```
## Documentation
For complete installation instructions, configuration options, and examples, visit our [documentation](https://relaticle.github.io/custom-fields/).
## Contributing
Contributions are welcome! Please see our [contributing guide](https://relaticle.github.io/custom-fields/community/contributing) in the documentation.
## 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.
Please take a look at our documentation for licensing details.