F
Filament13mo ago
Alan

disable field while 2 others are not filled in

Hello guys, I have 3 fields called: Room, start_date and end_date. I need the room field to be disabled while the start_date and end_date fields are not filled in. Thank you for the help.
Select::make('room')
->label('Romm')
->relationship('romm', 'number')
->searchable()
->live()
->disabled()
->options(Room::all()->where('status', 1)->pluck('name', 'id')),

DatePicker::make('start_date')
->label('reservation start')
->live()
->required(),

DatePicker::make('end_date')
->label('End of Reservation')
->live()
->required(),
Select::make('room')
->label('Romm')
->relationship('romm', 'number')
->searchable()
->live()
->disabled()
->options(Room::all()->where('status', 1)->pluck('name', 'id')),

DatePicker::make('start_date')
->label('reservation start')
->live()
->required(),

DatePicker::make('end_date')
->label('End of Reservation')
->live()
->required(),
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server