Only 1 i can add in repeater
I use custom page and custom widget but only 1 i can add.
my code
use InteractsWithForms;
use InteractsWithActions;
public $data = [];
public function mount(): void
{
$this->form->fill([
'Expertise' => [],
'Topics' => [],
'notes' => null,
]);
}
protected function getFormSchema(): array
{
return [
Wizard::make([
Step::make('Teaching Expertise')
->schema([
Repeater::make('Expertise')
->simple(
Select::make('category')
->options(
Category::all()->pluck('name', 'id')
)
->required(),
)
]), Step::make('Topic Proposal') ->schema([ Repeater::make('Topics') ->table([ TableColumn::make('topic'), TableColumn::make('category'), ]) ->schema([ TextInput::make('topic') ->required(), Select::make('category') ->options( Category::all()->pluck('name', 'id') ) ->required(), ]) ]), Step::make('Detailed Outline') ->schema([ Textarea::make('notes'), ]), ]) ]; }
]), Step::make('Topic Proposal') ->schema([ Repeater::make('Topics') ->table([ TableColumn::make('topic'), TableColumn::make('category'), ]) ->schema([ TextInput::make('topic') ->required(), Select::make('category') ->options( Category::all()->pluck('name', 'id') ) ->required(), ]) ]), Step::make('Detailed Outline') ->schema([ Textarea::make('notes'), ]), ]) ]; }

3 Replies
So what happens if you click
Add to expertise
?There's an error . Do you have resources on how to do crud in blade from custom widget or page. I know it is in documentation but my problem is the relationship how can i get record id something like that.

There's something really wrong then.
InteractsWithActions
provides mountAction
. Maybe some cache?