dwightwatson / bootstrap-form

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

Add support for input group #60 #96

Closed dansleboby closed 7 years ago

dansleboby commented 7 years ago

Issues #60

Usage

{!! BootForm::text('tel', 'Phone', null, ['suffix' => BootForm::addon('button', 'Call', ['class' => 'btn-success'])] ) !!}
{!! BootForm::text('tel', 'Phone', null, ['prefix' => BootForm::addon('button', 'Call', ['class' => 'btn-success'])] ) !!}
{!! BootForm::text('tel', 'Phone', null, ['prefix' => BootForm::addon('icon', 'dollar')] ) !!}
{!! BootForm::text('tel', 'Phone', null, ['prefix' => BootForm::addon('text', '1-'), 'suffix' => BootForm::addon('icon', 'phone')] ) !!}
{!! BootForm::text('tel', 'Phone', null, ['prefix' => BootForm::addon('button', 'Call', ['class' => 'btn-success'])] ) !!}
{!! BootForm::text('tel', 'Phone', null, ['suffix' => BootForm::addon('button', 'Boom!', ['class' => 'btn-danger']), 'prefix' => BootForm::addon('button', 'Call', ['class' => 'btn-success'])] ) !!}
dwightwatson commented 7 years ago

Awesome, thanks for taking the time to do this.

I've tweaked it a little bit - instead of the addon method taking the type as the first argument I've broken it out into addonButton, addonText and addonIcon methods. Hopefully this hasn't broken anything.

I'll tag a new release shortly.