Skip to content

feat: add field description/help text support#94

Merged
ManukMinasyan merged 1 commit into3.xfrom
feat/field-description-help-text
Feb 27, 2026
Merged

feat: add field description/help text support#94
ManukMinasyan merged 1 commit into3.xfrom
feat/field-description-help-text

Conversation

@ManukMinasyan
Copy link
Collaborator

@ManukMinasyan ManukMinasyan commented Feb 26, 2026

Summary

  • Adds optional description property to custom field settings DTO (stored in existing settings JSON column -- no migration needed)
  • Renders as helperText below fields in end-user Filament forms
  • Adds Textarea description input to the management form for admins
  • Gated behind FIELD_DESCRIPTION feature flag (enabled by default)

Closes #70

Test plan

  • PHPStan: 0 errors
  • Pint: formatted
  • All 383 existing tests pass
  • Manual: create a custom field with description, verify helper text appears in end-user form

Add optional description property to custom field settings that renders
as helper text below fields in end-user forms. Uses existing settings
JSON column (no migration needed) and a FIELD_DESCRIPTION feature flag
for consumers who don't want it.

Closes #70
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for optional description/help text on custom fields, addressing issue #70. The feature allows administrators to provide guidance to end users by adding descriptive text that appears below custom fields in forms. The implementation is feature-gated behind FIELD_DESCRIPTION (enabled by default) and leverages the existing JSON settings column to avoid database migrations.

Changes:

  • Adds FIELD_DESCRIPTION feature flag to control the availability of field descriptions
  • Extends CustomFieldSettingsData with nullable description property
  • Adds Textarea input to field management form for admins to enter descriptions
  • Renders descriptions as helperText in end-user forms when feature is enabled

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Enums/CustomFieldsFeature.php Adds FIELD_DESCRIPTION enum case to feature system
src/Data/CustomFieldSettingsData.php Adds nullable description property to settings DTO
src/Filament/Management/Schemas/FieldForm.php Adds Textarea field for description input in admin management form with 255 char limit
src/Filament/Integration/Base/AbstractFormComponent.php Conditionally renders description as helperText when feature enabled
resources/lang/en/custom-fields.php Adds translation key for description label
config/custom-fields.php Enables feature flag by default in config

@ManukMinasyan ManukMinasyan merged commit 9556170 into 3.x Feb 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an option to provide a description on a field.

2 participants