Ruby on Rails 3 Form radio button, text_field, error_messages, date_select

<% form_for @user do |f| %>
<% if @user.errors.any? %>
   <div class="error_messages">
<h2>Form is invalid</h2>
<ul>
<% for message in @user.errors.full_messages %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<p>
<%= f.label :email %><br />
<%= f.text_field :email %>
</p>
<p>
<%= f.label :password %><br />
<%= f.password_field :password %>
</p>
<p>
<%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation %>
</p>
<p>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.label :address %><br />
<%= f.text_field :address %>
</p>
<p>
<%= f.label :phone_number %><br />
<%= f.text_field :phone_number %>
</p>
<p>
<%= f.label :birthday %><br />
<%= f.date_select :birthday, :start_year => 1950 %>
</p>
<p>
<%= f.label :gender %><br />
<%= f.radio_button :gender, true %>Male
    <%= f.radio_button :gender, false %>Female
</p>
<p>
<%= f.label :facebook %><br />
<%= f.text_field :facebook %>
</p>
<p>
<%= f.label :blog %><br />
<%= f.text_field :blog %>
</p>
<p>
<%= recaptcha_tags %>
</p>
<p>
<%= f.submit "Sign Up"%>
</p>
<% end %>



Komentar

  1. Anonim02.54

    Hello there, just became alert to your blog through Google, and found that it's truly informative.
    I am going to watch out for brussels. I'll be grateful if
    you continue this in future. Lots of people will be benefited from your
    writing. Cheers!

    BalasHapus

Posting Komentar

terimakasih komentarnya

Postingan populer dari blog ini

EPrT English Proficiency Test Soal - soal

cara memunculkan dan menyembunyikan icon date, time, clock, volume, network, power battery, action center pada taskbar pada Windows 7