Skip to content

layout: :inline at the field level doesn't render correctly for email (and probably other types) #426

@lcreid

Description

@lcreid

Our test case for rendering a layout: :inline e-mail field within a layout: :horizontal form says the result should be:

<form accept-charset="UTF-8" action="/users" class="new_user" id="new_user" method="post" role="form">
  <input name="utf8" type="hidden" value="&#x2713;" />
  <div class="form-group">
    <label class="required" for="user_email">Email</label>
    <input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com" />
  </div>
</form>

However, if you put that into Bootply, you can see that the label is rendered above the input field: https://www.bootply.com/Yk1F2jl2OL.

Adding form-inline to the form-group that wraps the controls seems to give better output, although there should probably be some spacing applied too. Perhaps we could look at how check boxes and radio buttons are formatted in-line.

This probably affects all input types except radio and checkbox, and likely selects as well.

Also, specifying layout: :default at the level of form_group or on a control may not cause the elements to be rendered the Bootstrap 4 default way, if the form was built with layout: :inline.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions