textinput prefix with select dropdown
I am trying to create like image, but I stuck at few points. I can achieve only design like below
But there are two (or more maybe) problems comes:
1. How can I pass variable and loop through select options
2. How can I have these data (selected) for store/edit etc
How can I make it work for these points, or any other alternative ways to achieve the same
Solution:Jump to solution
I end up doing closure, need to return HtmlString
```php
->prefix(function () {
return new HtmlString(view('phone-input'));
})...
4 Replies
like this plugin
https://filamentphp.com/plugins/abanoub-nassem-phone-field
or maybe
https://github.com/GuavaCZ/filament-clusters
you can see how the doing it π
Filament
Phone field by Abanoub Nassem - Filament
Provides a Phone Input field for the Filament V2-V3 Forms, works in Admin-Panel and Forntend-Forms.
GitHub
GitHub - GuavaCZ/filament-clusters: Filament Clusters allows you to...
Filament Clusters allows you to visually cluster multiple fields together. - GuavaCZ/filament-clusters
prefix accept Closure
so
thanks, will look more
Solution
I end up doing closure, need to return HtmlString