© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
7 replies
Asmit

Custom Field Send Multiple Data

I have to create a custom field and I have to send extra form data while submit the form with extra customization. like
Here I make custom field by extending Rich Editor
CustomBio::make('bio')
  ->columnSpanFull(),
CustomBio::make('bio')
  ->columnSpanFull(),

This is my custom field class
<?php

namespace PackiMaster\Bio\Forms\Components;

use Filament\Forms\Components\RichEditor;
use Filament\Forms\Set;

class CustomBio extends RichEditor
{
    protected string $view = 'bio::forms.components.bio-editor';

    protected array|\Closure $mentionsItems = [];

    public function setUp(): void
    {
        parent::setUp();

        // Adding a hook to modify the form data on submission
        $this->afterStateHydrated(function ($component, $state, Set $set) {
            // Original state remains untouched
            $set($this->getStatePath(), $state);

            // Add mentions as separate data
            $set('bio_with_style', 'SOME_EXTRA_CUSTOMIZATION');
        });

    }
 
}
<?php

namespace PackiMaster\Bio\Forms\Components;

use Filament\Forms\Components\RichEditor;
use Filament\Forms\Set;

class CustomBio extends RichEditor
{
    protected string $view = 'bio::forms.components.bio-editor';

    protected array|\Closure $mentionsItems = [];

    public function setUp(): void
    {
        parent::setUp();

        // Adding a hook to modify the form data on submission
        $this->afterStateHydrated(function ($component, $state, Set $set) {
            // Original state remains untouched
            $set($this->getStatePath(), $state);

            // Add mentions as separate data
            $set('bio_with_style', 'SOME_EXTRA_CUSTOMIZATION');
        });

    }
 
}


How to send extra data
bio_with_style
bio_with_style
on submit the form ?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Multiple Field in Custom Field
FilamentFFilament / ❓┊help
2y ago
Send extra field from custom field.
FilamentFFilament / ❓┊help
2y ago
Custom field with multiple checkboxes
FilamentFFilament / ❓┊help
3y ago
Custom field: bind array data
FilamentFFilament / ❓┊help
2y ago