Closed tortuetorche closed 3 years ago
form-check-label
E.g. with Laravel:
{!! Former::open()->method('GET') !!} {!! Former::checkbox('test')->text('Test checkbox') !!} {!! Former::close() !!}
Render:
<div class="form-check"> <input class="form-check-input" id="test" type="checkbox" name="test" value="1"> <label for="test" class="form-check-label">Test checkbox</label> </div>
References:
@php $validator = Validator::make(request()->all(), [ 'failed_checkbox' => 'required', 'failed_radio' => 'required', 'failed_inline_checkbox' => 'required', 'failed_inline_radio' => 'required', 'failed_checkboxes' => 'required', 'failed_inline_checkboxes' => 'required', ]); $validator->fails(); Former::withErrors($validator); @endphp {!! Former::open()->method('GET') !!} {!! Former::checkbox('failed_checkbox')->text('Failed checkbox') !!} {!! Former::radio('failed_radio')->text('Failed radio') !!} {!! Former::checkbox('failed_inline_checkbox')->text('Failed inline checkbox')->inline() !!} {!! Former::radio('failed_inline_radio')->text('Failed inline radio')->inline() !!} {!! Former::checkboxes('failed_checkboxes')->checkboxes('first', 'second', 'third', 'fourth') !!} {!! Former::checkboxes('failed_inline_checkboxes')->checkboxes('first', 'second', 'third', 'fourth')->inline() !!} {!! Former::close() !!}
And here the result:
Reference: https://github.com/formers/former/issues/581#issuecomment-469710643
Add missing
form-check-label
CSS class for Bootstrap 4E.g. with Laravel:
Render:
References:
Fix invalid feedback visibility of checkboxes and radios for Bootstrap 4
E.g. with Laravel:
And here the result:![former_checkables_invalid_feedback_bs4](https://user-images.githubusercontent.com/5038872/103368871-005e6400-4ac9-11eb-803b-43e6072da8f9.png)
Reference: https://github.com/formers/former/issues/581#issuecomment-469710643