© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
26 replies
rg.block

Show/Hide fields based on selection

Hello, I am trying to migrate my form wizard from v2 to v3, but I am having some issues with a dependent select field. On v2, I was using reactive on the first select field, and on my secondary select field, I was using
->hidden(fn (Get $get) => $get('provider')=== null )
->hidden(fn (Get $get) => $get('provider')=== null )
to show/hide it if my provider select field had an option selected or not.

On v3, I am setting my provider field to
->live()
->live()
, and on my secondary one, I have:
->hidden(fn (Get $get): bool => $get('provider') === null)
->hidden(fn (Get $get): bool => $get('provider') === null)
but that does not seem to work. Also, when I make a selection on the provider one, I get a console error which I am not sure if it could be a bug or not. The error is attached.

The other additional piece of potential issue is that whenever I change the option on my provider select field, I clear the secondary one, and similarly, if I change the option on the secondary one, I clear a third one (the code for 3rd one not shown here).

Here is the link to the gist for the code I have on v3.

https://gist.github.com/rgut13rrez/42c660530ccb6fa6b4ae3e15483d5217

If it looks like a bug, and someone can point that out, I can follow up with a proper issue creating on github. Thanks
Screenshot_2023-07-24_at_18.19.57.png
Gist
order.php
GitHub Gist: instantly share code, notes, and snippets.
order.php
Solution
Ok, I can confirm that setting 'inject_morph_markers' => false, fixes the issue.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Hide a Column based on getTabs() selection
FilamentFFilament / ❓┊help
12mo ago
show/hide reorder based on conditions?
FilamentFFilament / ❓┊help
3y ago
Show/Hide Table Columns based on getTabs()
FilamentFFilament / ❓┊help
3y ago
How to Show the Relationship based table field based on dropdown selection
FilamentFFilament / ❓┊help
2y ago