Keydown Event on Input Field

With a filament form, is it possible to do something like this:
<select name="sport_id wire:model="inputs.sport_id" @keydown.ctrl="$wire.inputs.copySport = !$wire.inputs.copySport">
<option value=0>Select Sport</option>
<option value=1>Football</option>
<option value=2>Baseball</option>
<option value=3>Basketball</option>
</select>
<input type="checkbox" tabindex="-1" class="mt-6 ml-2" wire:model="inputs.copySport" />
<select name="sport_id wire:model="inputs.sport_id" @keydown.ctrl="$wire.inputs.copySport = !$wire.inputs.copySport">
<option value=0>Select Sport</option>
<option value=1>Football</option>
<option value=2>Baseball</option>
<option value=3>Basketball</option>
</select>
<input type="checkbox" tabindex="-1" class="mt-6 ml-2" wire:model="inputs.copySport" />
I've done this with Alpine but was wondering if it can be done using the form builder.
3 Replies
Shaung Bhone
Shaung Bhone8mo ago
Select::make()?
rubendn
rubendn8mo ago
The keydown event on the Select not creating a simple Select.
Shaung Bhone
Shaung Bhone8mo ago
I think you need to define your custom field https://filamentphp.com/docs/3.x/forms/fields/custom