An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

![Custom Fields](art/preview.png)


Downloads
Laravel 12
PHP 8.3
License
License

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.