TableRepeater::make('options')
->relationship('formFields')
->label('')
->disableLabel()
->cloneable()
->schema([
TextInput::make('name')
->required(),
//... more fields
//Button in tablerepeater showing additional inputs in modal to be added to each formField. Saving this additional data in database will be when user click save button in parent.
DropInAction::make('additional-options-field')
->execute(function (Closure $get, Closure $set) {
return Action::make('fillOptions')
->mountUsing(
//How can i fill the data in modal?
)
->action(function (array $data, $component, $livewire) use($get, $set): void {
//...
}
->form( function() use($get) {
return [
TextInput::make('options.minLength'),
TextInput::make('options.maxLength'),
TextInput::make('options.minValue'),
TextInput::make('options.maxValue'),
];
})
}),
]),
TableRepeater::make('options')
->relationship('formFields')
->label('')
->disableLabel()
->cloneable()
->schema([
TextInput::make('name')
->required(),
//... more fields
//Button in tablerepeater showing additional inputs in modal to be added to each formField. Saving this additional data in database will be when user click save button in parent.
DropInAction::make('additional-options-field')
->execute(function (Closure $get, Closure $set) {
return Action::make('fillOptions')
->mountUsing(
//How can i fill the data in modal?
)
->action(function (array $data, $component, $livewire) use($get, $set): void {
//...
}
->form( function() use($get) {
return [
TextInput::make('options.minLength'),
TextInput::make('options.maxLength'),
TextInput::make('options.minValue'),
TextInput::make('options.maxValue'),
];
})
}),
]),