© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
urbycoz

How can I make the action button in my form toggle the visibility of another section?

I've tried doing this but the visibility doesn't change.

private $showPreviousAddress = true;
...
Section::make('Person')
->schema([
TextInput::make('residentialaddress1')->label('Name'),
Actions::make([
Action::make('Show/Hide Details')
->action(function () {
$this->showHideDetails= !$this->showHideDetails;
})
]),
]),
Section::make('Person Details')
->visible($this->showHideDetails)
->schema([
TextInput::make('prevresidentialaddress1')->label('Address Line 1'),
TextInput::make('prevresidentialpostcode')->label('Postcode')
]),
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

How to make toggle button in infolist?
FilamentFFilament / ❓┊help
17mo ago
How to use toggle button as action button in repeater
FilamentFFilament / ❓┊help
10mo ago
Toggle visibility on Form Field is slow
FilamentFFilament / ❓┊help
3y ago
How can I make my form action show a confirmation modal?
FilamentFFilament / ❓┊help
2y ago