© 2026 Hedgehog Software, LLC

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

how to hide a form field conditionally?

I have two Radio Buttons. And want to hide the Select field candidato if no a special radio option is clicked.

Select::make('puesto')
                        ->searchable()
                        ->label( __('Oferta'))
                        ->options(JobOffer::all()
                            ->where('job_offer_open', true)
                            ->sortBy('title')
                            ->pluck('title', 'id'))
                        ->required(),

                    Radio::make('comparison_type')
                        ->label( __('Tipo de comparación'))
                        ->options([
                            '1with1' =>  __('1 Oferta con 1 Candidato'),
                            '1withAll' =>  __('1 Oferta con todos los Candidatos'),
                        ])
                        ->default('1withAll')
                        ->required()
                        ->inline(),

                    Components\ConditionalSelect::make('candidato')
                        ->searchable()
                        ->label( __('Candidato (solamente activos)'))
                        ->options(Applicant::all()
                            ->where('is_active', true)
                            ->sortBy('full_name')
                            ->pluck('full_name', 'id'))
                        ->dependsOn('comparison_type', '1with1')
                        ->required(),
Select::make('puesto')
                        ->searchable()
                        ->label( __('Oferta'))
                        ->options(JobOffer::all()
                            ->where('job_offer_open', true)
                            ->sortBy('title')
                            ->pluck('title', 'id'))
                        ->required(),

                    Radio::make('comparison_type')
                        ->label( __('Tipo de comparación'))
                        ->options([
                            '1with1' =>  __('1 Oferta con 1 Candidato'),
                            '1withAll' =>  __('1 Oferta con todos los Candidatos'),
                        ])
                        ->default('1withAll')
                        ->required()
                        ->inline(),

                    Components\ConditionalSelect::make('candidato')
                        ->searchable()
                        ->label( __('Candidato (solamente activos)'))
                        ->options(Applicant::all()
                            ->where('is_active', true)
                            ->sortBy('full_name')
                            ->pluck('full_name', 'id'))
                        ->dependsOn('comparison_type', '1with1')
                        ->required(),
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

Conditionally hide form in modal action
FilamentFFilament / ❓┊help
3y ago
Conditionally hide a section
FilamentFFilament / ❓┊help
3y ago
Hide field in form
FilamentFFilament / ❓┊help
2y ago
How to hide this button - conditionally
FilamentFFilament / ❓┊help
6mo ago