Skip to content

how to add wrapper to allow specify an icon before form input #6

@jpwynn

Description

@jpwynn

Even without the gem your wrapper code is very useful!

One nice addition would be to add a wrapper for simple_form that lets one specify an icon before the input field, eg, results in

<div class="row">
    <form class="col s12">
      <div class="row">
        <div class="input-field col s6">

          <i class="material-icons prefix">account_circle</i>

          <input id="icon_prefix" type="text" class="validate">
          <label for="icon_prefix">First Name</label>
        </div>
        <div class="input-field col s6">

          <i class="material-icons prefix">phone</i>

          <input id="icon_telephone" type="tel" class="validate">
          <label for="icon_telephone">Telephone</label>
        </div>
      </div>
    </form>
  </div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions