Skip to content

Commit ecf38a0

Browse files
committed
docs: fix documentation discrepancies for v3
- Update requirements: PHP 8.3, Laravel 12, Filament 5.x - Fix field type keys from underscores to hyphens (rich-editor, etc.) - Add missing field types: email, phone, file-upload, record - Add 7 missing features to configuration docs - Fix lookupType example to use 'record' field type - Update Filament docs links from 4.x to 5.x
1 parent e43fcf3 commit ecf38a0

File tree

5 files changed

+29
-17
lines changed

5 files changed

+29
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A powerful Laravel/Filament plugin for adding dynamic custom fields to any Eloqu
2323
## Requirements
2424

2525
- PHP 8.3+
26-
- Laravel via Filament 4.0+
26+
- Filament 5.0+
2727

2828
## Getting Started
2929

docs/content/1.getting-started/1.installation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Get started with Custom Fields in just a few steps.
1313

1414
## Requirements
1515

16-
- **PHP**: 8.2 or higher
17-
- **Laravel**: 11.28 or higher
18-
- **Filament**: 4.x
16+
- **PHP**: 8.3 or higher
17+
- **Laravel**: 12 or higher
18+
- **Filament**: 5.x
1919
- **Tailwind CSS**: 4.0 or higher
2020

2121
## Installation
@@ -63,7 +63,7 @@ Choose your installation method based on your license type:
6363
::alert{type="info"}
6464
You need a custom Filament theme to include the Custom Fields styles.
6565

66-
If you haven't set up a custom theme for Filament, follow the [Filament Docs](https://filamentphp.com/docs/4.x/panels/themes#creating-a-custom-theme) first.
66+
If you haven't set up a custom theme for Filament, follow the [Filament Docs](https://filamentphp.com/docs/5.x/panels/themes#creating-a-custom-theme) first.
6767
::
6868

6969
Once you have a custom Filament theme set up, add the plugin's views to your theme CSS file:
@@ -110,7 +110,7 @@ Choose your installation method based on your license type:
110110
::alert{type="info"}
111111
You need a custom Filament theme to include the Custom Fields styles.
112112

113-
If you haven't set up a custom theme for Filament, follow the [Filament Docs](https://filamentphp.com/docs/4.x/panels/themes#creating-a-custom-theme) first.
113+
If you haven't set up a custom theme for Filament, follow the [Filament Docs](https://filamentphp.com/docs/5.x/panels/themes#creating-a-custom-theme) first.
114114
::
115115

116116
Once you have a custom Filament theme set up, add the plugin's views to your theme CSS file:

docs/content/2.essentials/1.configuration.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,18 @@ The package supports these features that can be enabled/disabled:
115115
| `FIELD_CONDITIONAL_VISIBILITY` | Show/hide fields based on conditions |
116116
| `FIELD_ENCRYPTION` | Encrypt sensitive field values |
117117
| `FIELD_OPTION_COLORS` | Color-coded options for select fields |
118+
| `FIELD_CODE_AUTO_GENERATE` | Auto-generate field codes from names |
119+
| `FIELD_MULTI_VALUE` | Allow multiple values per field |
120+
| `FIELD_UNIQUE_VALUE` | Enforce unique constraint per entity type |
121+
| `FIELD_VALIDATION_RULES` | Enable validation rule configuration |
118122
| `UI_TABLE_COLUMNS` | Show custom fields as table columns |
119123
| `UI_TOGGLEABLE_COLUMNS` | Allow users to toggle column visibility |
124+
| `UI_TOGGLEABLE_COLUMNS_HIDDEN_DEFAULT` | Hide toggleable columns by default |
120125
| `UI_TABLE_FILTERS` | Enable filtering by custom field values |
126+
| `UI_FIELD_WIDTH_CONTROL` | Custom field width per field |
121127
| `SYSTEM_MANAGEMENT_INTERFACE` | Enable the management interface |
122128
| `SYSTEM_MULTI_TENANCY` | Enable multi-tenant isolation |
129+
| `SYSTEM_SECTIONS_ENABLED` | Enable field grouping in sections |
123130

124131
::alert{type="info"}
125132
If your custom models include tenant-specific scoping logic, you'll need to register a [custom tenant resolver](#custom-tenant-resolution) to ensure validation works correctly.

docs/content/2.essentials/3.field-types.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ Custom Fields includes 20+ pre-configured field types:
3131
| **Toggle** | `toggle` | Boolean | Switch-style toggle |
3232
| **Toggle Buttons** | `toggle-buttons` | Single-choice | Button group selection |
3333
| **Date** | `date` | Date | Date picker |
34-
| **Date Time** | `datetime` | DateTime | Date and time picker |
34+
| **Date Time** | `date-time` | DateTime | Date and time picker |
3535
| **Color Picker** | `color-picker` | String | Visual color selection |
3636
| **File Upload** | `file-upload` | String | File upload with validation |
37+
| **Record** | `record` | Multi-choice | Polymorphic model lookup |
3738

3839
## Creating Custom Field Types
3940

docs/content/2.essentials/4.preset-custom-fields.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,18 @@ The system uses string-based field type identifiers. Here are the available fiel
2626
### Text Types
2727
- `'text'` - Single line text input
2828
- `'textarea'` - Multi-line text area
29-
- `'rich_editor'` - Rich text editor
30-
- `'markdown_editor'` - Markdown editor
29+
- `'rich-editor'` - Rich text editor
30+
- `'markdown-editor'` - Markdown editor
31+
- `'email'` - Email input with validation
32+
- `'phone'` - Phone number input
3133

3234
### Numeric Types
3335
- `'number'` - Numeric input
3436
- `'currency'` - Currency formatted input
3537

3638
### Date Types
3739
- `'date'` - Date picker
38-
- `'datetime'` - Date and time picker
40+
- `'date-time'` - Date and time picker
3941

4042
### Boolean Types
4143
- `'checkbox'` - Single checkbox
@@ -44,14 +46,16 @@ The system uses string-based field type identifiers. Here are the available fiel
4446
### Choice Types
4547
- `'select'` - Dropdown selection
4648
- `'radio'` - Radio buttons
47-
- `'multi_select'` - Multiple selection dropdown
48-
- `'checkbox_list'` - Checkbox list
49-
- `'toggle_buttons'` - Toggle button group
50-
- `'tags_input'` - Tag input field
49+
- `'multi-select'` - Multiple selection dropdown
50+
- `'checkbox-list'` - Checkbox list
51+
- `'toggle-buttons'` - Toggle button group
52+
- `'tags-input'` - Tag input field
5153

5254
### Other Types
53-
- `'color_picker'` - Color selection
55+
- `'color-picker'` - Color selection
5456
- `'link'` - URL input
57+
- `'file-upload'` - File upload with validation
58+
- `'record'` - Polymorphic model lookup
5559

5660
## Creating Fields
5761

@@ -123,15 +127,15 @@ $this->migrator->new(
123127

124128
## Adding Lookup Types
125129

126-
For fields that reference other models, use the `lookupType()` method:
130+
For fields that reference other models, use the `record` field type with the `lookupType()` method:
127131

128132
```php
129133
$this->migrator->new(
130134
model: Order::class,
131135
fieldData: new CustomFieldData(
132136
name: 'Sales Representative',
133137
code: 'sales_rep',
134-
type: 'select',
138+
type: 'record',
135139
section: new CustomFieldSectionData(
136140
name: 'Sales',
137141
code: 'sales',

0 commit comments

Comments
 (0)