How to enable or disable fields based on select in edit page ?
i have 2 select field which is diabled in edit and want to enabled only when channel_id 's value =="website" and similarly status select is only editable when channel is website otherwise both are disabled
:Select::make('channel_id')
->label('Channel')
->disabled()
->relationship('channel', 'name')
->preload()
->searchable()
->columnSpan([
'default' => 3,
'sm' => 3,
'md' => 1,
'xl' => 1,
'2xl' => 1,
]),
Select::make('status')
->required()
->options(get_marketplace_config('order_status'))
->columnSpan([
'default' => 3,
'sm' => 3,
'md' => 1,
'xl' => 1,
'2xl' => 1,
]),
4 Replies
Try this ? On "status" select
@hugomyb Thanks for your reply yeh this work for status slecet but how can we handle channel ?
To activate the "channel_id" select if the value is "website"?
On
channel_id
select :
Does it work ? @aliabbas8356@hugomyb i am checking w8t
@hugomyb this is working perfectly thanks
😊