Text input for selectbox

Hi there! I am still relatively new to Filament, but loving it so far! I do have a question regarding record creation within a form. I am rewriting a form in filament, and I am using a select dropdown to populate an address field. Now in our old application, you would be able to enter text directly in the selectbox, and it would try find that address, otherwise it would add a new address record based on the text entered in the selectbox. Now by the looks of it, it does not seem like you can enter text directly in filament Select components(unless I am missing something from the docs?) So my alternative would be to add a add button next the dropdown, and once the user clicks on it, it opens the Address creation modal. So my question is: Can I change the selectboxto accept text? And if not, how can I open that modal, so that the user can add and save their new address. Or maybe there is a better way of doing it? This is my Select field: $origpersField = Forms\Components\Select::make('ORIGPERS') ->label('From') ->columnSpan($defColSpan) ->options(function (Get $get) { // Retrieve the selected customer's value $selectedCustomer = $get('CUSTOMER'); // If a customer is selected, use their value to filter addresses if ($selectedCustomer) { return Addresses::where('ACCNUM', '=', $selectedCustomer)->pluck('NAME', 'PLACE')->toArray(); } // If no customer is selected, return an empty array or default options return Addresses::pluck('NAME', 'PLACE')->toArray(); }) ->required(); Thanks in advance
2 Replies
Want results from more Discord servers?
Add your server
More Posts
How to add client side code to take values from a field in real time and adding them in filament ?How to add client side code I read docs but not able to understand how can I do it ?`requiresConfirmation(false)` still shows confirmation dialog for Delete actionI have the following table action ```php Actions\DeleteAction::make('delete')) ->icon('heroiconError when deploying to production using Laravel Forge, svg path not foundHas anyone run into this when deploying to production? I'm using laravel forge. "The path for the dCharacters are removed on browser auto-fillHi, when I use the auto fill function of my browser the input field removes characters (see the vidDownloading Error conflicts with another requireI am using windows when i want to install ``composer require filament/filament:"^3.2" -W`` ```>> TDateTimePicker IssueI am using DateTimePicker field i am using its timezone method i need to show in ui date time in accopen_basedir restriction in effect : FileUpload::make('attachment')Hello, I've been having an issue for several days now... When I perform a "simple" upload directlyShow table records when "Apply filters" clickedHello everybody, newbie here. How to make to show records only when you click "Apply filters" buttoHow do I make a table column searchable based on its state value?I have a table column that has a default value of a user_id. However, I format the state to show theHow to override layout to make a real custom theme ?Hi, I try to override list-records or layout panel based in this directory : '''vendor\filament\fila