SirAlyon
SirAlyon
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
It is working perfectly fine 🙂 ❤️
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
@Tally You have saved me from days of futile attempts. I don't know how to thank you! Thank you so much.
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
I have some doubts this is the right method to accomplish what i need :/
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
(still not working)
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
Something like that:
ToggleButtons::make('allocazione')
->label('')
->multiple()
->required()
->markAsRequired(false)
->options([
'obbligazionaria' => 'Obbligazionaria',
'prudente' => 'Prudente',
'moderata' => 'Moderata',
'azionaria' => 'Azionaria',
'libera' => 'Libera',
])
//->disableOptionWhen(fn (string $value): bool => $value === 'libera')
->disableOptionWhen(function (string $value) {
switch ($value) {
case 'obbligazionaria':
return 'true';
break;
case 'prudente':
return 'true';
break;
case 'moderata':
return 'true';
break;
case 'azionaria':
return 'true';
break;
}
})
ToggleButtons::make('allocazione')
->label('')
->multiple()
->required()
->markAsRequired(false)
->options([
'obbligazionaria' => 'Obbligazionaria',
'prudente' => 'Prudente',
'moderata' => 'Moderata',
'azionaria' => 'Azionaria',
'libera' => 'Libera',
])
//->disableOptionWhen(fn (string $value): bool => $value === 'libera')
->disableOptionWhen(function (string $value) {
switch ($value) {
case 'obbligazionaria':
return 'true';
break;
case 'prudente':
return 'true';
break;
case 'moderata':
return 'true';
break;
case 'azionaria':
return 'true';
break;
}
})
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
Pump
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
as you can see "libera" is disabled by default
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
No description
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
and trying with something like
->disableOptionWhen(fn (string $value): bool => $value === 'libera')
->disableOptionWhen(fn (string $value): bool => $value === 'libera')
result in:
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
This code is disabling 'obbligazionaria', 'prudente','moderata', 'azionaria' by default..
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
Sorry but im not understanding how to use this function:
ToggleButtons::make('allocazione')
->label('')
->multiple()
->required()
->markAsRequired(false)
->options([
'obbligazionaria' => 'Obbligazionaria',
'prudente' => 'Prudente',
'moderata' => 'Moderata',
'azionaria' => 'Azionaria',
'libera' => 'Libera',
])
->disableOptionWhen(function (string $value) {
switch ($value) {
case 'obbligazionaria':
return 'libera';
break;
case 'prudente':
return 'libera';
break;
case 'moderata':
return 'libera';
break;
case 'azionaria':
return 'libera';
break;

}
})
->rules([new Allocazione])
->inline()
ToggleButtons::make('allocazione')
->label('')
->multiple()
->required()
->markAsRequired(false)
->options([
'obbligazionaria' => 'Obbligazionaria',
'prudente' => 'Prudente',
'moderata' => 'Moderata',
'azionaria' => 'Azionaria',
'libera' => 'Libera',
])
->disableOptionWhen(function (string $value) {
switch ($value) {
case 'obbligazionaria':
return 'libera';
break;
case 'prudente':
return 'libera';
break;
case 'moderata':
return 'libera';
break;
case 'azionaria':
return 'libera';
break;

}
})
->rules([new Allocazione])
->inline()
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
I'm trying, im gonna paste the code asap. Thanks for help
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
Ye i tried with this method but coudn't work as excepted 😦
24 replies
FFilament
Created by SirAlyon on 5/24/2024 in #❓┊help
Help Needed with ToggleButtons in Filament Form
Anyone? 😦
24 replies
FFilament
Created by Sourabh on 4/4/2024 in #❓┊help
Failed to import csv
Try to share ur resources code
27 replies
FFilament
Created by Sourabh on 4/4/2024 in #❓┊help
Failed to import csv
Then we are missing something 🙂
27 replies
FFilament
Created by Sourabh on 4/4/2024 in #❓┊help
Failed to import csv
Seems ok to me. The failed_import_rows is showing the wrong import attempts?
27 replies
FFilament
Created by Sourabh on 4/4/2024 in #❓┊help
Failed to import csv
Try to share more infos
27 replies
FFilament
Created by Sourabh on 4/4/2024 in #❓┊help
Failed to import csv
This is strange. A failed job is supposed to be found there
27 replies
FFilament
Created by Sourabh on 4/4/2024 in #❓┊help
Failed to import csv
Try to share the error message. You can find it in ur db in the "failed jobs" table
27 replies