CreateOptionForm in Repeater with dependent select component
I have a Repeater with dependent addon_name select field that ties to the addon_type field. Now I want users to be able to add new add-on name options to the list, like others, the problem is I didn't define the relationship() for the addon_name from the get-go. Bcs as you know I use the customization technique for the dependent name options. How do I go about this?
Solution:Jump to solution
```php
->createOptionForm([
Select::make('type')->label('Add-on Type')
->options(Addon::pluck('type', 'type'))
->required(),...
4 Replies
@keyme0209 Can you share the Repeater code and a quick screenshot? Not sure I'm getting the full picture yet...
I think you're missing a
createOptionUsing()
@pboivin here
Solution
?
thank you that worked, was gonna say the new addon name is inserted in database but for some reason when i submitted the form, the addon type was included in the addon name options as well haha. we returned the wrong thing
many thanks mr leandro~!