Skip to content

Help text rendered inside input-group instead of form-group #444

@ehutzelman

Description

@ehutzelman

I believe this may be related to #434

When using help text along with a prepend, the following structure is generated with the help text being rendered inside the input-group:

<div class="form-group">
  <label>Label</label>
  <div class="input-group">
    <div class="input-group-prepend">
      <span class="input-group-text">$</span>
    </div>
    <input class="form-control" type="text" name="my_field">
    <small class="form-text text-muted">help text here...</small> <!-- Original location -->
  </div>
</div>

This is causing rending issues at some widths with the help text being rendered to the right of the input field instead of below it. When moving the help text outside of the input-group and inside the outer form-group, the issue seems to be fixed and the help text renders underneath the input field as expected:

<div class="form-group">
  <label>Label</label>
  <div class="input-group">
    <div class="input-group-prepend">
      <span class="input-group-text">$</span>
    </div>
    <input class="form-control" type="text" name="my_field">
  </div>
  <small class="form-text text-muted">help text here...</small>  <!-- Moved here -->
</div>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions