Skip to content

Support/how-to for floating labels #534

@johanlunds

Description

@johanlunds

Hi,

Is there an easy or recommended way to generate markup for floating labels? Two examples:

Basically I think it needs:

  • some extra custom CSS using :placeholder-shown

  • generate form <label> AFTER the <input> like this:

    <input type="email" class="form-control" id="exampleInputEmail" placeholder="Enter email" autocomplete="email" required>
    <label for="exampleInputEmail">Email</label>

I think this could be a nice addition to bootstrap_form, either as a section in the README or as actual code/API additions.

Screenshot

Example_Rails_application_with_SimpleForm_and_Bootstrap

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions