© 2026 Hedgehog Software, LLC

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

Dynamic field

Hi, i have got
Attribute
Attribute
called result which looks like this:
    protected function result(): Attribute
    {
        return Attribute::make(
            get: fn () => $this->type === Type::Value
                ? $this->pivot->result_int
                : $this->pivot->result_varchar,
        );
    }
    protected function result(): Attribute
    {
        return Attribute::make(
            get: fn () => $this->type === Type::Value
                ? $this->pivot->result_int
                : $this->pivot->result_varchar,
        );
    }

Now in filamentphp form i want to have a conditional field; meaning when the type is
int
int
i want it to display
TextInput
TextInput
and when it's
varchar
varchar
Select
Select
, i know this can be done when using a form, but in my case i want it to be in the table with the field
TextInputColumn
TextInputColumn
.
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

Dynamic Repeater Field
FilamentFFilament / ❓┊help
2y ago
dynamic field type
FilamentFFilament / ❓┊help
2y ago
Dynamic Form Field
FilamentFFilament / ❓┊help
3y ago
Multi field FieldComponent
FilamentFFilament / ❓┊help
2y ago