Ask, reply and learn. Join the community of Akaunting.
How do you make a field not required when using the Form::selectGroup()?
My current attempt is:
{{ Form::selectGroup('account_id',
trans('doc-manager::general.account'),
'bars',
$accountsList,
old('account_id', $doc->account_id)),
['required' => 'false']
}}
I've tried setting 'required' => null, 'required' => false, 'required' => 'false' as well as leaving it blank, but it still sets it as required.
Thanks
You should send empty array like below.
{{ Form::selectGroup('account_id',
trans('doc-manager::general.account'),
'bars',
$accountsList,
old('account_id', $doc->account_id)),
[]
}}
Thanks. I tried that but it still shows as required.
It does not seem to matter what I put there. It only accepts the values set in App\Providers\Form for Facade::component('selectGroup'...). Maybe I'm doing something wrong, but I can't tell that I am.
Showing 1 to 4 of 4 discussions