F
Filament7mo ago
lmtc

Can I use a custom form field to pull in a form

I'm trying to create a custom form component that has a few fields and a repeater, but I can't seem to access the data in the modal that pops up:
->modalContent(function (array $arguments, PagesModel $record, Repeater $component): View {

$block_id = $component->getItemState($arguments['item']);


return view('filament.forms.components.styling-model', [
'record' => $record,
'block_id' => $block_id
]);
}),
->modalContent(function (array $arguments, PagesModel $record, Repeater $component): View {

$block_id = $component->getItemState($arguments['item']);


return view('filament.forms.components.styling-model', [
'record' => $record,
'block_id' => $block_id
]);
}),
Then the view:
<x-filament::section>
<x-filament-panels::form>
{{ $this->form }}
</x-filament-panels::form>
</x-filament::section>
<x-filament::section>
<x-filament-panels::form>
{{ $this->form }}
</x-filament-panels::form>
</x-filament::section>
and the form:
public function form(Form $form,$block_id,$data,$additional_fields=array()): Form
{return $form
->schema([])
}
public function form(Form $form,$block_id,$data,$additional_fields=array()): Form
{return $form
->schema([])
}
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server