0

I'm currently working on a Ruby on Rails project and I'm working with a Form Helper, which I'm currently struggling with.

  1. I'm looking to learn the best method to input a password confirmation into a signup form using Rails 4.
  2. Upon running the View's code from below there are labels for each field. How do I remove these and just leave the input fields?
  3. How do you input icons for fields inside the <%= %> tags?

                    <div class="col-md-6" id="signup_form"> <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :format => :js, :remote => true) do |f| %>
                        <%= f.error_notification %>
                        <%= f.input :name, :placeholder => "Name" %>
                        <%= f.input :email, :placeholder => "Email Address" %>
                        <%= f.input :password, :placeholder => "Password" %>
                        <%= f.input :password_confirm, :placeholder=> "Confirm Password" %>
    
                        <div class="form-actions" style="margin-bottom: 15px">
                            <%= f.button :submit, "Create Account", :class => "btn btn-primary btn-custom-red" %>
    
                        </div>
                    <% end %>
                </div>
    

Thanks for your time.

RubyMax
  • 341
  • 4
  • 16

1 Answers1

0

My first advise would be not to use Simple Form if you're not familiar with form builder. It's a simplification of something that you haven't mastered and it will give you more trouble than benefit - hence 1,2

Re:3 check this out: Add Twitter Bootstrap icon to Input box

Community
  • 1
  • 1
Lukasz Muzyka
  • 2,783
  • 1
  • 30
  • 41
  • A developer I'm working with has put it together, but I just want to add some tweaks. So I won't be using the Simple Form much, I'm hoping to sort 1. and 2. today and then spend a bit of time going forward building my foundations with forms. Thanks for the input Lukasz. – RubyMax Feb 04 '15 at 10:38