© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
9 replies
*

Testing select field options

I've implemented some logic to update the query in a select field using
modifyQueryUsing(closure)
modifyQueryUsing(closure)


Is there a way to test this logic?

Maybe using a closure with
assertFormFieldExists()
assertFormFieldExists()
?
Like...

livewire(CreateUser::class)
    ->assertFormFieldExists('organisations', function (Select $input) {
        return /* some logic here */;
    });
livewire(CreateUser::class)
    ->assertFormFieldExists('organisations', function (Select $input) {
        return /* some logic here */;
    });


I've attempted to get the options using the
$input
$input
closure param above with no luck.

Note: My select is
multiple()
multiple()
and has
preload()
preload()


Any help and/or insight 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

Options List for Select Field
FilamentFFilament / ❓┊help
3y ago
Select Field Options Key And Value
FilamentFFilament / ❓┊help
2y ago
select options
FilamentFFilament / ❓┊help
3y ago
Select Options
FilamentFFilament / ❓┊help
3y ago