Maxime
Maxime
FFilament
Created by Maxime on 10/7/2024 in #❓┊help
Programmatically fill repeaters in EditRecord page
Is there a way to fill repeaters in an EditRecord page with some values ? Using ->default() is only possible on a CreateRecord page IIRC. I've tried directly using
$form->fill([
'repeated_field' => [
['key' => 'value'],
['key' => 'value'],
...
]
]);
$form->fill([
'repeated_field' => [
['key' => 'value'],
['key' => 'value'],
...
]
]);
but nothing gets added to the repeater, and if i dd() the form raw state right after, this is what i get :
array:1 [
"repeated_field" => []
]
array:1 [
"repeated_field" => []
]
13 replies