Horia
Horia
FFilament
Created by Horia on 1/15/2024 in #❓┊help
Dynamic select not saving data
I have a Edit Action for a table row. In the form I have a Select field which is dependant of other 2 fields in the form. I populate the select field like this:
Select::make('race_age_group_id')
->required()
->options(fn (Get $get): array =>
$this->getRaceAgeGroupOptionsFromAgeAndGender($get('birth_year'), $get('gender'))
),
Select::make('race_age_group_id')
->required()
->options(fn (Get $get): array =>
$this->getRaceAgeGroupOptionsFromAgeAndGender($get('birth_year'), $get('gender'))
),
My problem is that if the select field is updated (by changing the other 2 fields), the new value is not changed. It is only changed if I open the select dropdown and choose another option. What can I do to fix that? I would be OK even if I can just clear the select field, and force the user to choose the new option. Thanks!
2 replies
FFilament
Created by Horia on 11/28/2023 in #❓┊help
Custom validation message for requiredWithoutAll
How can I set a custom validation message for this validation rule? requiredWithoutAll('field1,field2') It doesn't work as per documentation, like this: validationMessages(['requiredWithoutAll' => 'Custom message'])
6 replies
FFilament
Created by Horia on 11/16/2023 in #❓┊help
Render custom calculated field in a form
I have a form which takes some inputs and based on that inputs (number of persons) I need to calculate some price. Can I do that in a custom view field? How do I inject the current form state in that view? Or some parameters to display?
3 replies
FFilament
Created by Horia on 11/2/2023 in #❓┊help
Summary Sum() of 2 fields
Is there a way to add a summary sum of 2 columns from the database? I have an accessor for that, but Sum() doesn't work with that name. Thanks!
7 replies
FFilament
Created by Horia on 10/10/2023 in #❓┊help
Notifications not showing
I installed the Notifications package after the Tables, but my notifications are not showing. I get no errors in the console. Everything else works. Is there a way to debug? The js for notifications is loaded by Vite, in my page i have: <script src="http://flontaevents.test/js/filament/notifications/notifications.js?v=3.0.47.0" data-navigate-track></script> Any suggestions?
8 replies
FFilament
Created by Horia on 9/5/2023 in #❓┊help
Filament color and layout issues after upgrading to v3
No description
13 replies
FFilament
Created by Horia on 9/5/2023 in #❓┊help
Undefined method Action:make after upgrading to v3
After I upgraded to v3, the Action::make() method says 'Undefined method make'. The table still works. What could be the issue with that? Thanks!
2 replies