FilamentF
Filament15mo ago
Maxime

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'],
    ...
  ]
]);

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" => []
]
Was this page helpful?