spacedev
Setting the default value of a TextInput within a Repeater
I think the problem is related to ->default() method
This one does not work
TextInput::make('prefix')->default(fn (Get $get) => $get('../../cap'))
This one does work, I'm able to get cap from outside the repeater
Select::make('prefix')->options(function(Get $get){return ['cap' => $get('../../cap')];})
19 replies
Setting the default value of a TextInput within a Repeater
I was thinking of setting the repeater field based on the cap field, I mean within the repeater, using "Get". Anyway, setting the repeater field from the afterStateUpdated of the first Select field or the CAP TexInput would be ok.
19 replies
Setting the default value of a TextInput within a Repeater
Yes, I'm using it in the create page. If I set a default value to the cap field I'm able to get it from prefix field. But what if cap field is set dynamically? Is there a way to set a repeater field value from outside the repeater?
19 replies