Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CSS class to the label of a group #604

Merged
merged 3 commits into from
Jan 21, 2021

Conversation

tortuetorche
Copy link
Contributor

Usage with Laravel and Bootstrap 4:

{!! Former::open()->method('GET') !!}
    {!! Former::text('foo')->addLabelClass('bar') !!}
{!! Former::close() !!}

Will produce:

<form accept-charset="utf-8" class="form-horizontal" method="GET">
  <div class="form-group row">
    <label for="foo" class="bar col-form-label col-lg-2 col-sm-4">Foo</label>
    <div class="col-lg-10 col-sm-8">
      <input class="form-control" id="foo" type="text" name="foo">
    </div>
  </div>
</form>

Usage with Laravel and Bootstrap 4:

{!! Former::open()->method('GET') !!}
    {!! Former::text('foo')->addLabelClass('bar') !!}
{!! Former::close() !!}

Will produce:

<form accept-charset="utf-8" class="form-horizontal" method="GET">
  <div class="form-group row">
    <label for="foo" class="bar col-form-label col-lg-2 col-sm-4">
      Foo
    </label>
    <div class="col-lg-10 col-sm-8">
      <input class="form-control" id="foo" type="text" name="foo">
    </div>
  </div>
</form>
@tortuetorche tortuetorche requested review from a team and removed request for a team January 5, 2021 16:44
@tortuetorche tortuetorche merged commit 2c25bef into formers:master Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant