netojose / laravel-bootstrap-4-forms

Bootstrap 4 forms for Laravel 5/6/7/8
MIT License
183 stars 58 forks source link

Can't add class to form open #82

Open inpresif opened 5 years ago

inpresif commented 5 years ago

I've been trying all sorts of variants, none seem to work?

{!! Form::open()->url(url('/usersettings/'))->multipart()->method('post')->id('usersettings')->idPrefix('usrsettings_')->class('whatever') !!}

The above throws an error: Call to undefined method NetoJose\Bootstrap4Forms\FormService::class()

This one (or variations) just doesn't add anything: {!! Form::open(['url' => '/submitform/', 'class' => 'whatevr'] )) !!}

This also gives the same class error by the way: {!!Form::open()->formInline()!!}

Using LV 5.8 on XAMPP php7+

EDIT: Figured out it needs to be ->attrs(['class' => 'dropzone'])