hacxper
hacxper
FFilament
Created by hacxper on 8/9/2023 in #❓┊help
Get repeated record inside RepeatableEntry
can you provide me some code? If I can load data through my model, it would be possible.
9 replies
FFilament
Created by hacxper on 8/9/2023 in #❓┊help
Get repeated record inside RepeatableEntry
$record returns top level model, not related model.
9 replies
FFilament
Created by hacxper on 8/9/2023 in #❓┊help
Get repeated record inside RepeatableEntry
I might use fillForm() for actions, but I'm not sure how can I get the proper data
9 replies
FFilament
Created by hacxper on 8/9/2023 in #❓┊help
Get repeated record inside RepeatableEntry
sure,
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
/* ... some fields */
RepeatableEntry::make('products')
->schema([
TextEntry::make('orderStatus.title')
->badge(),
Actions::make([
Action::make('updateProduct')
->requiresConfirmation()
->form([
TextInput::make('order_link')
->required(), /* I want to get product.order_link here where product is the current repeated record */
])
->size(ActionSize::ExtraSmall)
->action(function (array $data) {
/* want to save product's order_link here */
return;
}),
/* ... some more actions */

]),
]),
]);
}
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
/* ... some fields */
RepeatableEntry::make('products')
->schema([
TextEntry::make('orderStatus.title')
->badge(),
Actions::make([
Action::make('updateProduct')
->requiresConfirmation()
->form([
TextInput::make('order_link')
->required(), /* I want to get product.order_link here where product is the current repeated record */
])
->size(ActionSize::ExtraSmall)
->action(function (array $data) {
/* want to save product's order_link here */
return;
}),
/* ... some more actions */

]),
]),
]);
}
9 replies
FFilament
Created by Shavik on 8/4/2023 in #❓┊help
Adding Button/Action to Panel Header
7 replies