phiamo / MopaBootstrapBundle

Easy integration of twitters bootstrap into symfony2
http://bootstrap.mohrenweiserpartner.de
711 stars 348 forks source link

Inline form spacing #1233

Open MisatoTremor opened 6 years ago

MisatoTremor commented 6 years ago

Elements in inline forms currently stick together as form_row uses spaceless.

The example of the BS3 documentation shows this:

<form class="form-inline"> <div class="form-group"> <label for="exampleInputName2">Name</label> <input class="form-control" id="exampleInputName2" placeholder="Jane Doe"> </div> <div class="form-group"> <label for="exampleInputEmail2">Email</label> <input type="email" class="form-control" id="exampleInputEmail2" placeholder="jane.doe@example.com"> </div> <button type="submit" class="btn btn-default">Send invitation</button> </form>

But is rendered like this (note that widget_form_group_start does not use spaceless):

<form class="form-inline"><div class="form-group"><label for="exampleInputName2">
        Name
                                        </label><input class="form-control" id="exampleInputName2" placeholder="Jane Doe"></div><div class="form-group"><label for="exampleInputEmail2">
        Email
                                        </label><input type="email" class="form-control" id="exampleInputEmail2" placeholder="jane.doe@example.com"></div><button type="submit" class="btn btn-default">Send invitation</button></form>

But I'm unsure if removing spaceless from form_row might break something else so this might be a bit more complicated.

Ideas?