Last letter is not capitalized

help me, why the last letter is not capitalized this is my code:
TextInput::make('police_number')
->required()
->placeholder('KB 1234 ST')
->extraAlpineAttributes(['@input' => '$el.value = $el.value.toUpperCase()']),
TextInput::make('police_number')
->required()
->placeholder('KB 1234 ST')
->extraAlpineAttributes(['@input' => '$el.value = $el.value.toUpperCase()']),
thankyou
Solution:
i solved by adding mutateFormDataUsing
```php ... $data['police_number'] = strtoupper($data['police_number']);...
Jump to solution
5 Replies
wandiaprianto
wandiapriantoOP13mo ago
this the result
No description
wandiaprianto
wandiapriantoOP13mo ago
Please anyone, can u help me? thanks
LeandroFerreira
LeandroFerreira13mo ago
->dehydrateStateUsing(fn (string $state): string =>Str::upper($state)) ?
wandiaprianto
wandiapriantoOP13mo ago
cant' Sir updated code:
TextInput::make('police_number')
->required()
->placeholder('KB 1234 ST')
->live()
->dehydrateStateUsing(fn (string $state): string =>Str::upper($state)),
TextInput::make('police_number')
->required()
->placeholder('KB 1234 ST')
->live()
->dehydrateStateUsing(fn (string $state): string =>Str::upper($state)),
the result:
No description
Solution
wandiaprianto
wandiaprianto13mo ago
i solved by adding mutateFormDataUsing
...
$data['police_number'] = strtoupper($data['police_number']);
...
...
$data['police_number'] = strtoupper($data['police_number']);
...
thanks everyone
Want results from more Discord servers?
Add your server