adamwathan / bootforms

Rapid form generation with Bootstrap 3 and Laravel.
MIT License
417 stars 103 forks source link

Label issues with array form #83

Open simplenotezy opened 8 years ago

simplenotezy commented 8 years ago

There are issues if you do this:

{!! BootForm::text('Name', 'tickettype[][name]') !!}

It generates the following:

<fieldset class="form-group">
    <label class="control-label" for="tickettype[][name]">Name</label>
    <input type="text" name="tickettype[][name]" id="tickettype[][name]" class="form-control">
</fieldset>

But that is invalid when you have multiple. Id and labels does not work.

adamwathan commented 8 years ago

Can you start a PR with a failing test? Happy to look at it then, just a bit busy at the moment! Cheers.

simplenotezy commented 8 years ago

Hm, well I guess the issue is that id, and label should not be added, if the name is array type