Suky
Suky
FFilament
Created by Suky on 4/9/2024 in #❓┊help
Dinamically update options based on another input
thanks ur an mvp
12 replies
FFilament
Created by Suky on 4/9/2024 in #❓┊help
Dinamically update options based on another input
also what if I got this
Forms\Components\Select::make('supplier_id')
->label('Supplier')
->required()
->searchable()
->options(
\App\Models\Supplier::all()
->pluck('name', 'id')
)
->columnSpan(2),
Forms\Components\TextInput::make('total_units')
->required()
->columnSpan(2),
Forms\Components\TextInput::make('cost_unit')
->required()
->columnSpan(2),
Forms\Components\TextInput::make('total_cost')
->required()
->columnSpan(2),
Forms\Components\Repeater::make('marketplaces')
->relationship('markets')
->reorderableWithButtons()
->schema([
Forms\Components\Select::make('marketplace_id')
->searchable()
->label('Marketplace')
->required()
->options(
\App\Models\Marketplace::all()
->pluck('country', 'id')->toArray()
)
->columnSpan(1),
Forms\Components\TextInput::make('quantity')
->required()
->columnSpan(1),
])
->columnSpan(4),
Forms\Components\Select::make('supplier_id')
->label('Supplier')
->required()
->searchable()
->options(
\App\Models\Supplier::all()
->pluck('name', 'id')
)
->columnSpan(2),
Forms\Components\TextInput::make('total_units')
->required()
->columnSpan(2),
Forms\Components\TextInput::make('cost_unit')
->required()
->columnSpan(2),
Forms\Components\TextInput::make('total_cost')
->required()
->columnSpan(2),
Forms\Components\Repeater::make('marketplaces')
->relationship('markets')
->reorderableWithButtons()
->schema([
Forms\Components\Select::make('marketplace_id')
->searchable()
->label('Marketplace')
->required()
->options(
\App\Models\Marketplace::all()
->pluck('country', 'id')->toArray()
)
->columnSpan(1),
Forms\Components\TextInput::make('quantity')
->required()
->columnSpan(1),
])
->columnSpan(4),
and I want the sum of the quantity from the marketplaces to be auto updated inside the total_units input?
12 replies
FFilament
Created by Suky on 4/9/2024 in #❓┊help
Dinamically update options based on another input
or do I have to set some parameters in order to do it
12 replies
FFilament
Created by Suky on 4/9/2024 in #❓┊help
Dinamically update options based on another input
does it update in real time like it's wire:model.live?
12 replies
FFilament
Created by Suky on 4/9/2024 in #❓┊help
Dinamically update options based on another input
gotcha so it's $get for things like these, tysm
12 replies
FFilament
Created by Suky on 4/9/2024 in #❓┊help
Dinamically update options based on another input
bump
12 replies
FFilament
Created by Suky on 3/28/2024 in #❓┊help
DateTimePicker Formatting
ah tysm
4 replies