Hima
Nested Repeater data not pre-populated to edit form
Tabs\Tab::make('Plan Your Meal')
->schema([
Forms\Components\Repeater::make('menumapping') ->relationship('menumapping') // Parent relationship ->label('') ->createItemButtonLabel('Add Menu') ->schema([
Forms\Components\Select::make('menu_category_id') ->label('') ->relationship('category', 'name') ->searchable() ->columns(4) ->reactive() ->preload(),
Forms\Components\Repeater::make('childMenuMappings') ->relationship() ->label('') ->createItemButtonLabel('Add Article') ->schema([ Forms\Components\TextInput::make('display_name') ->label('Display Name'), Forms\Components\TextInput::make('qty') ->label('Qty')->default(1) ->numeric() ->minValue(1), ]) ])
]) ->columnSpan('full') This is simple code. still not child repeater is not pre-populated in edit form
Forms\Components\Repeater::make('menumapping') ->relationship('menumapping') // Parent relationship ->label('') ->createItemButtonLabel('Add Menu') ->schema([
Forms\Components\Select::make('menu_category_id') ->label('') ->relationship('category', 'name') ->searchable() ->columns(4) ->reactive() ->preload(),
Forms\Components\Repeater::make('childMenuMappings') ->relationship() ->label('') ->createItemButtonLabel('Add Article') ->schema([ Forms\Components\TextInput::make('display_name') ->label('Display Name'), Forms\Components\TextInput::make('qty') ->label('Qty')->default(1) ->numeric() ->minValue(1), ]) ])
]) ->columnSpan('full') This is simple code. still not child repeater is not pre-populated in edit form
7 replies