How to conditionally set a field as non-required based on the value of another field?
I have a checkbox ('location_type'), and I want to remove the 'required' constraint from a subsequent field ('name') if the checkbox is checked, utilizing the reactive() method. The relevant code snippet is as follows:
Checkbox::make('location_type')->inline()->reactive(),
TextInput::make('name')
->required()
->maxLength(191)
->columnSpan(1),
3 Replies