dwightwatson / bootstrap-form

Bootstrap 3 form builder for Laravel
MIT License
217 stars 133 forks source link

Input-group with prefix/suffix incorrect alignment in horizontal forms #101

Closed flof closed 6 years ago

flof commented 6 years ago

When I add a input with a prefix or suffix addon to a horizontal form, the input field is not aligned with normal inputs without prefix or suffix. It is wider on the left and right side. The problem seems to be that the input-group class is added to the wrapper div which also has the classes from the right_column_class setting. They seem to conflict. When I manuall add anoter wrapper div inside and put the input-group class there, it displays correctly.

Screenshot:

bootstrap-addon-issue-horizontal

Code:

<div class="panel panel-default">
    <div class="panel-body">
        {!! BootForm::horizontal(['model' => $monitor, 'store' => 'ExampleController@store']) !!}
        {!! BootForm::text('name') !!}
        {!! BootForm::number('max_ping_interval', 'Ping interval', null, ['suffix' => BootForm::addonText('min')]) !!}
        {!! BootForm::checkbox('enabled') !!}
        {!! BootForm::submit('Create') !!}
        {!! BootForm::close() !!}
    </div>
</div>