PHPackages                             ffhs/filament-package\_ffhs\_custom\_forms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ffhs/filament-package\_ffhs\_custom\_forms

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ffhs/filament-package\_ffhs\_custom\_forms
==========================================

Custom forms for Fernfachhochschule Schweiz (FFHS)

2.0.10(1w ago)15104↓100%5[2 issues](https://github.com/ffhs/filament-package_ffhs_custom_forms/issues)MITPHPPHP ^8.2

Since Jul 10Pushed 1w agoCompare

[ Source](https://github.com/ffhs/filament-package_ffhs_custom_forms)[ Packagist](https://packagist.org/packages/ffhs/filament-package_ffhs_custom_forms)[ RSS](/packages/ffhs-filament-package-ffhs-custom-forms/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (17)Versions (7)Used By (0)

CustomForms Overview
====================

[](#customforms-overview)

This plugin enables you to **create and manage nested forms** within FilamentPHP.
It provides a wide range of **customizable form fields** and supports behavioral rules and templates.

[![Latest Version on Packagist](https://camo.githubusercontent.com/9b69a64ebbc20a38cc78534a29aacde88bb97fa2470ece83d64e2849186bef51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666668732f66696c616d656e742d7061636b6167655f666668735f637573746f6d5f666f726d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ffhs/filament-package_ffhs_custom_forms)
[![Total Downloads](https://camo.githubusercontent.com/e3e982b5dc80e7af2ef110c1b602294547e8be1daaed6e28866df3a47e416d39/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666668732f66696c616d656e742d7061636b6167655f666668735f637573746f6d5f666f726d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ffhs/filament-package_ffhs_custom_forms)

Features:
---------

[](#features)

- ✅ **Multiple Form Types**: Bind forms to different use cases (e.g. entities) through customizable form types.
- 🧩 **General Fields**: Define general fields for exports and reusability across form types.
- 🛠 **Configurable Field Types**: Includes various fields like Repeaters to add additional inputs dynamically.
- 🤏 **drag &amp; drop** Use an intuitive form builder.
- 🔁 **Reactive Rules**: Set up rules that react to answers by changing field visibility or modifying selectable options.
- 🌟 **Prioritized Select Field**: Use enhanced select fields with prioritized or sorted options.
- 📄 **Template Snippets**: Create reusable form templates to maximize reusability.
- 🧱 **Custom Components**: Easily embed CustomForms into your application using Filament components.
- 👁️ **Multiple View Modes**: Switch rendering styles based on where the form is used.
- 🔧 **Extensible Architecture**: Everything is designed to be customizable, add your own fields, rules, and templates.
- ⬇️ **Import/Export**: You can import and export custom forms directly from the UI..

---

Screenshots
-----------

[](#screenshots)

### Editor

[](#editor)

[![](images/editor_1.png)](images/editor_1.png)

[![](images/editor_2.png)](images/editor_2.png)

---

### Templates

[](#templates)

[![](images/template_1.png)](images/template_1.png)

[![](images/template_2.png)](images/template_2.png)

---

### Fill Form

[](#fill-form)

[![](images/fill_form_1.png)](images/fill_form_1.png)
-----------------------------------------------------

[](#)

### View Form

[](#view-form)

[![](images/view_form_1.png)](images/view_form_1.png)

---

### Rule Editor

[](#rule-editor)

[![](images/rule_editor_1.png)](images/rule_editor_1.png)

---

### General Fields

[](#general-fields)

[![](images/general_field_1.png)](images/general_field_1.png)

---

Installation
------------

[](#installation)

- Install the package via composer:

```
composer require ffhs/filament-package_ffhs_custom_forms^2.0
```

- Publish and run the migrations:

```
php artisan vendor:publish --tag="filament-package_ffhs_custom_forms-migrations"
php artisan migrate
```

- Publish the config file with:

```
php artisan vendor:publish --tag="filament-package_ffhs_custom_forms-config"
```

- Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-package_ffhs_custom_forms-views"
```

Simple Usage
------------

[](#simple-usage)

- **Register the Plugin** Add the plugin to your panel provider:

```
// App/Providers/Filament/xxPanelProvider

->plugins([CustomFormPlugin::make()])
```

Now you can try the Plugin in the Panel with the DefaultFormConfiguration.

Wiki
----

[](#wiki)

I'm sorry, but the Github wiki is not yet complete.

Features explained
------------------

[](#features-explained)

### ✅ Form Configurations (FormTypes)

[](#-form-configurations-formtypes)

You can create different **FormTypes**, each with its own set of available **FieldTypes** and required \*\*GeneralFields
\*\*.
This allows you to customize forms for different application scenarios.

For example, you might have custom forms for requests and custom forms for applications. Now you can create two
different FormTypes:

- One requires a general field for the **study location**
- The other does **not** include this field

This makes the form system flexible and reusable across various use cases.

---

### CustomFields

[](#customfields)

A **CustomField** consists of:

- A **FieldType** – Defines the type and logic of the field (e.g. `TextType`, `SelectType`, etc.).
- A set of **Options** – Configuration values such as placeholder text, min/max values, selectable choices, etc.
- A **FieldTypeView** – Which can change on a different ViewMode

#### Predefined Field Types

[](#predefined-field-types)

#### 📥 Input Fields

[](#-input-fields)

- `TextType::class`
- `EmailType::class`
- `NumberType::class`
- `TextAreaType::class`
- `DateTimeType::class`
- `DateType::class`
- `DateRangeType::class`
- `FileUploadType::class`
- `CheckboxType::class`

#### 🔘 Choice Fields

[](#-choice-fields)

- `SelectType::class`
- `RadioType::class`
- `CheckboxListType::class`
- `ToggleButtonsType::class`

#### ✨ Special Fields

[](#-special-fields)

- `TagsType::class`
- `KeyValueType::class`
- `ColorPickerType::class`
- `IconSelectType::class`

#### 📐 Layout Components

[](#-layout-components)

- `SectionType::class`
- `FieldsetType::class`
- `GroupType::class`
- `TitleType::class`
- `TextLayoutType::class`
- `DownloadType::class`
- `ImageLayoutType::class`
- `SpaceType::class`
- `RepeaterLayoutType::class`

---

### TypeOptions

[](#typeoptions)

The TypeOptions are options components which can add to a field-type to modify the components.
The TypeOptions can automatically apply some effects if the
`return $input = $this->makeComponent(TextInput::class, $record);` is used in the TypeView.

#### Predefined Type Option Classes

[](#predefined-type-option-classes)

These classes define configurable TypeOptions used in CustomFormFields.

1. `ActionLabelTypeOption.php`
2. `AllowedFileTypeOption.php`
3. `AlpineMaskOption.php`
4. `AmountOption.php`
5. `AsideOption.php`
6. `BooleanOption.php`
7. `ColorTypeOption.php`
8. `ColumnsOption.php`
9. `ColumnSpanOption.php`
10. `DateFormatOption.php`
11. `DefaultAmountOption.php`
12. `Downloadable.php`
13. `FastTypeOption.php`
14. `GridLayoutOption.php`
15. `GroupedOption.php`
16. `HelperTextTypeOption.php`
17. `HiddenLabelOption.php`
18. `IconOption.php`
19. `ImaginaryTypeOption.php`
20. `InLineLabelOption.php`
21. `InLineOption.php`
22. `MaxAmountOption.php`
23. `MaxLengthOption.php`
24. `MaxSelectOption.php`
25. `MaxValueOption.php`
26. `MinAmountOption.php`
27. `MinLengthOption.php`
28. `MinSelectOption.php`
29. `MinValueOption.php`
30. `MultipleOption.php`
31. `NewLineOption.php`
32. `OpenInNewTabOption.php`
33. `PreserveFilenamesOption.php`
34. `RelatedFieldOption.php`
35. `ReorderableTypeOption.php`
36. `RequiredOption.php`
37. `SeveralOption.php`
38. `ShowAsFieldsetOption.php`
39. `ShowAsFieldsOption.php`
40. `ShowImagesOption.php`
41. `ShowInViewOption.php`
42. `ShowLabelOption.php`
43. `ShowLinkOption.php`
44. `SuggestionsOption.php`
45. `TextOption.php`
46. `ValidationAttributeOption.php`
47. `ValidationMessageOption.php`

#### Using TypeOptions in a CustomFieldType

[](#using-typeoptions-in-a-customfieldtype)

You can add **extra type options** to your custom field by overriding `extraTypeOptions()` or `generalTypeOptions()`:

```
// MyType.php
public function extraTypeOptions(): array  {
    return [
       'alpine_mask' => AlpineMaskOption::make()
           ->modifyDefault(fn($oldDefault) => '...'),
       'max_length' => MaxLengthOption::make()
           ->modifyOptionComponent(fn($component) => $component->columnStart(1)),
       'min_length' => MinLengthOption::make(),
    ];
}
```

- Each key represents the **option name**.
- The value is an instance of a `TypeOption`, usually created via `::make()`.
- You can customize how the option behaves using methods like `modifyDefault()` or `modifyOptionComponent()`.

#### Use FastTypeOption

[](#use-fasttypeoption)

**FastTypeOption** allows you to quickly add custom options directly in your `FieldType` and react to them in your
`FieldTypeView`.

```
//MyType.php
public function extraTypeOptions(): array  {
    return [
       'my_option' => FastTypeOption::makeFast(
           default: false,
           fn($name) => Toggle::make($name)
       )
    ];
}
```

```
// MyTypeView.php
$myOption = $this->getOptionParameter($record, 'my_option');

/** @var TextInput $input */
$input = $this->makeComponent(TextInput::class, $record);

if($myOption){
    $input->modify(...);
}

return $input
```

### OptionsGroups

[](#optionsgroups)

OptionsGroups help organize multiple related TypeOptions into logical collections,
making your field configuration cleaner and easier to manage.

In the image TypeOptions are marked red and the OptionGroups are marked blue.
[![](images/options_and_groups.png)](images/options_and_groups.png)

#### How to use OptionGroups?

[](#how-to-use-optiongroups)

```
//MyType.php
public function extraTypeOptions(): array  {
    return [
        TypeOptionGroup::make('MyGroup', [
           'alpine_mask' => AlpineMaskOption::make(),
          'max_length' => MaxLengthOption::make(),
          'min_length' => MinLengthOption::make(),
       ]),
       ValidationTypeOptionGroup::make(),
        LayoutOptionGroup::make()
           ->mergeTypeOptions([
              'my_option' => MyTypeOption::make(),
          ])
          ->removeTypeOption('...'),
    ];
}
```

---

### Rules: Events and Triggers

[](#rules-events-and-triggers)

Rules can be divided into events and triggers. Triggers cause events to be executed. A rule can consist of multiple
triggers that can be combined using 'AND' or 'OR' logic and can execute multiple events.

#### Predefined Events

[](#predefined-events)

- `HideEvent`
- `VisibleEvent`
- `DisabledEvent`
- `RequiredEvent`
- `ChangeOptionsEvent`

#### Predefined Triggers

[](#predefined-triggers)

- `IsInfolistTrigger`
- `ValueEqualsRuleTrigger`
- `AlwaysRuleTrigger`

---

### Embed CustomForms

[](#embed-customforms)

You can embed CustomForms or their answers in various parts of your application using specialized components. Below are
examples of usage patterns and customization options.

---

Testing
-------

[](#testing)

```
./vendor/bin/testbench vendor:publish --tag="filament-package_ffhs_custom_forms-migrations"
./vendor/bin/testbench workbench:build
./vendor/bin/pest test
```

Postcards
---------

[](#postcards)

We highly appreciate you sending us a postcard.
You'll find our address on our [page](https://www.ffhs.ch/).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance95

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Recently: every ~59 days

Total

6

Last Release

12d ago

Major Versions

1.0.2 → 2.0.72025-12-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/073a310596cb20c3d46570f8095fcf5f19e3e37b5464577ff40cc22fa2ac5b73?d=identicon)[ffhs](/maintainers/ffhs)

---

Top Contributors

[![Odion-DS](https://avatars.githubusercontent.com/u/93391784?v=4)](https://github.com/Odion-DS "Odion-DS (1219 commits)")[![jeanluc-bittel](https://avatars.githubusercontent.com/u/186709743?v=4)](https://github.com/jeanluc-bittel "jeanluc-bittel (18 commits)")[![moleculech](https://avatars.githubusercontent.com/u/11146294?v=4)](https://github.com/moleculech "moleculech (10 commits)")[![TeselCoding](https://avatars.githubusercontent.com/u/147048947?v=4)](https://github.com/TeselCoding "TeselCoding (4 commits)")

---

Tags

ffhsfilament-package\_ffhs\_custom\_forms

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/ffhs-filament-package-ffhs-custom-forms/health.svg)

```
[![Health](https://phpackages.com/badges/ffhs-filament-package-ffhs-custom-forms/health.svg)](https://phpackages.com/packages/ffhs-filament-package-ffhs-custom-forms)
```

###  Alternatives

[eightynine/filament-approvals

Manage approval processes in your filament application

12016.4k1](/packages/eightynine-filament-approvals)[jaocero/filachat

FilaChat is a plugin for integrating real-time customer support chat into your application. Provides tools for both customer and agent chat interfaces, with features for managing and maintaining chat conversations.

1843.5k](/packages/jaocero-filachat)[marcogermani87/filament-cookie-consent

Easy cookie consent integrations for Filament

1916.7k](/packages/marcogermani87-filament-cookie-consent)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
