© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
3 replies
TheBrewSensei

Set other form fields from within a Livewire component as field

How can i set the value of a form field from a livewire component that is inside a form.

 public static function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\Section::make('')
                    ->compact()
                    ->columnSpan(1)
                    ->columns(2)
                    ->schema([
                         Forms\Components\Livewire::make(LiveSearchComponent::class),

  Forms\Components\TextInput::make('name')
])

//Livewire component
class LiveSearchComponent extends Component
{
    public function render()
    {
        return view('livewire.live-search-component');
    }
}
 public static function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\Section::make('')
                    ->compact()
                    ->columnSpan(1)
                    ->columns(2)
                    ->schema([
                         Forms\Components\Livewire::make(LiveSearchComponent::class),

  Forms\Components\TextInput::make('name')
])

//Livewire component
class LiveSearchComponent extends Component
{
    public function render()
    {
        return view('livewire.live-search-component');
    }
}


how do i access the $form inside LiveSearchComponent, i want to set 'name' field from within LiveSearchComponent.

Is there a way to do it?
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

Trying to modify filament form fields from custom Livewire Field component.
FilamentFFilament / ❓┊help
15mo ago
Missing styles on form within livewire component
FilamentFFilament / ❓┊help
5mo ago
How to pass event from livewire component to Form Field Component
FilamentFFilament / ❓┊help
2y ago
Custom form field and Custom Livewire component
FilamentFFilament / ❓┊help
2y ago