© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•17mo ago•
4 replies
treii28

Cascading/conditional form on polymorphic relations?

I have a model where I created two polymorphic nullable relations to change the 'nature' of an order based on what type of product it is. The company has two main types of products, one in a book-like album form, one as a single print item.

Thus the OrderItem model can have either an albumitemable or printitemable morph that adds the respective properties for the album and print variations.

Now I'm trying to add this to the orderitem form.

So basically I need a selector or perhaps radio-box elements that allow a user to select if it's an album or a print product, then have the associated properties (form elements) show for that type.

The filament documentation is so piecemeal I can't even seem to find anything that tells me how to add something so simple as a form field that won't be attempted to be saved, no less figure out how to use that field to show/hide other element groups in the form.

Any help is appreciated.
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

Conditional form relationships
FilamentFFilament / ❓┊help
3y ago
Polymorphic relations in filament
FilamentFFilament / ❓┊help
3y ago
Form Builder support for polymorphic relationships
FilamentFFilament / ❓┊help
2y ago
Builder query for polymorphic relations
FilamentFFilament / ❓┊help
3y ago