laravel-form-builder icon indicating copy to clipboard operation
laravel-form-builder copied to clipboard

Custom Attr on Label

Open kadevland opened this issue 6 years ago • 0 comments

exemple what i want :

<div class="form-group row">
<label for="col-sm-2 col-form-label" class="form-label">Name</label>
<div class="col-sm-10">
<input class="form-control" name="name" type="text" id="name">
</div>

The code in view:

<div class="form-group row">
        {!! form_label($form->name,['attr'=>['class'=>'col-sm-2 col-form-label']]) !!}        
        <div class="col-sm-10">         
        {!! form_widget($form->name) !!}
      </div>
</div>

see the resulat i have:

<div class="form-group row">
<label for="name" class="form-label">Name</label>
<div class="col-sm-10">
<input class="col-sm-2 col-form-label" name="name" type="text" id="name">
</div>

kadevland avatar Aug 16 '18 10:08 kadevland