Rodrigo Barreto

Joined

50 Experience
0 Lessons Completed
0 Questions Solved

Activity

I'm new to Rails and even more to Slim. I need to put an Icon (i'm using Fontawesome icon) inside a f.text_field, but have no idea how.

My code has:

    i.fa.fa-user.fa-2x
    =f.text_field :name , placeholder: "Nome",class: "form-control"

The goal is to put the icon inside de text_field on the left side.
Anyone can help me? Thanks, and sorry for my bad english
logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.