Disable checkbox options
Hello, guys. I have this CheckboxList::make('mealPlan')
->columns(3)
->label(' ')
->reactive()
->options([
'breakfast' => "Breakfast",
'lunch' => "Lunch",
'dinner' => "Dinner",
'allInclusive' => 'All Inclusive',
'halfBoard' => 'Half-board',
'none' => 'None'
]), Is it possible to disable breakfast, lunch, dinner, halfBoard, none when allInclusive is checked?
4 Replies
I don’t think there is a method to disable single entries.
Have you please another idea of how can I implement what I need?
youd probably need a custom field as ours doesnt support that
or use separate checkboxes, which you can disable individually
Ok. Thank you all
And one more question, please. TextInput::make('name')
->reactive()
->regex('/^[a-zA-Z]+$/')
->minLength(2)
->maxLength(50)
->required(), I have this TextInput with regex validation. Is there a way to show the validation error in realtime instead of showing it after the user click on create/edit?
Or should I use mask to prevent the user from entering certain characters?