Open modal with table for searching the right element
I'm writing a classic "order" manager.
In the order there are various fields and a contact field. It's a select where you can choose a contact form a select filament item.
I would like to add a suffix action; when the user click and that action I would like to open a modal with a table inside with a lot of filter for selecting the contact. Once clicked on the right contact, the modal will close and the calue will be returned (or mayb use a fillForm for filling some fields).
How can I do that?
I mean:
- opening the modal
- show the table
- select the item from the table
- fill some form elements of the parent form
See attached image
Thank you
12 Replies
Really not even an hint?
someone made something similler
https://discord.com/channels/883083792112300104/883084832387760148/1169599085389561899
you can set custom livewire component as a field
Thank Lara Zeus. THis is more or less what I need. Unlucky the plugin is not ready yet (as far as I know)
since this is not a common use case you could test and try and maybe contribute with the author
https://github.com/statview-app/filament-record-finder
GitHub
GitHub - statview-app/filament-record-finder: Record finder form co...
Record finder form component for Filament. Contribute to statview-app/filament-record-finder development by creating an account on GitHub.
cc @Sebastiaan
This is a work in progress package
Thanks, I will take a look @ Sebastiaan work.
I'm quite surprised about "this is not a common task", Lara.
In a lot of software is really a common task.
Just an example: you have to insert an emailm but you remember only that is form Spain, and the real name is Pablo, and family name is starting with... damn... oh yes, is starting with "DE".
Easy to find if you have a modal with a table and some filters... near impossible to find in a SELECT BOX...
I would customize the searchable of the select menu, to search in other fields
but ya maybe it's not common case for me π
We are speakig about more than 10000 contacts identified and categorized with a lot of fields. I tried to think how to do that with a select. But there are at least 10 different common fields where I could search and most of the time with logical AND between the various fields. Select if perfect if your research plays in the minor league. For the major league you need something more complex. π
Of course there is a work around: find the contact in the contact-resource (with all the search fields that you need) and add an action for the creating -let me say- an "Offer". The problem is than you need a button for every kind of activity you want to do on that contact. Not impossible but not nice IMHO.
I do experience the same issue. I really need some additional data to identify the record I would like to attach. A table is pretty much needed. Would love to see first party support but I don't know if that will ever happen
You can format the select list with html and allow searching. So that use case of a modal is much less
@toeknee in large and complex data it can't be done with just search, for example, trying to find customers who've made sales more than 3 times in a week. It's not gonna work with regular keyword searches.