<% form_tag '/simple', class: 'simple-form' do %>
  <%= hidden_field_tag :session_id, value: '__secret__' %>
  <% field_set_tag do %>
    <%= label_tag :username %>
    <%= text_field_tag :username %>
    <%= label_tag :password %>
    <%= password_field_tag :password %>
    <%= label_tag :email %>
    <%= email_field_tag :email %>
    <%= label_tag :age %>
    <%= number_field_tag :age %>
    <%= label_tag :telephone %>
    <%= telephone_field_tag :telephone %>
    <%= label_tag :webpage %>
    <%= url_field_tag :webpage %>
    <%= label_tag :search %>
    <%= search_field_tag :search %>
    <%= check_box_tag :remember_me %>
    <%= label_tag :gender %>
    <%= label_tag :color %>
    <%= select_tag :color, options: ['green', 'orange', 'purple'] %>
    <%= select_tag :type, grouped_options: { 'foo' => ['foo', 'bar'], 'bar' => ['foo', 'bar'] } %>
    <%= select_tag :character, grouped_options: [['Friends', ['Yoda', ['Obiwan', 1]]], ['Enemies', ['Palpatine', ['Darth Vader', 3]]]] %>
    <%= radio_button_tag :gender, value: 'male' %>
    <%= radio_button_tag :gender, value: 'female' %>
    <%= submit_tag %>
  <% end %>
<% end %>

<% form_tag '/advanced', id: 'advanced', class: 'advanced-form', method: 'get' do %>
  <%= error_messages_for MarkupUser.new, header_message: 'There are problems with saving user!' %>
  <%= hidden_field_tag :session_id, value: '__secret__' %>
  <% field_set_tag 'Advanced', class: 'advanced-field-set' do %>
    <p>
      <%= label_tag :username, class: 'first', caption: "Nickname" %>
      <%= text_field_tag :username, value: params[:username], id: 'the_username' %>
    </p>
    <p>
      <%= label_tag :password, class: 'first' %>
      <%= password_field_tag :password, value: params[:password] %>
    </p>
    <p>
      <%= label_tag :email, caption: 'Email Address' %>
      <%= email_field_tag :email, class: 'string' %>
    </p>
    <p>
      <%= label_tag :age, class: 'age' %>
      <%= number_field_tag :age, class: 'numeric' %>
    </p>
    <p>
      <%= label_tag :telephone, class: 'telephone' %>
      <%= telephone_field_tag :telephone, class: 'numeric' %>
    </p>
    <p>
      <%= label_tag :webpage, caption: 'Your Home Page' %>
      <%= url_field_tag :webpage, class: 'string' %>
    </p>
    <p>
      <%= label_tag :search %>
      <%= search_field_tag :search, class: 'string' %>
    </p>
    <p>
      <%= label_tag :about, class: 'about', caption: 'About Me' %>
      <%= text_area_tag :about, class: 'large' %>
    </p>
    <p>
     <%= label_tag :photo, class: 'photo' %>
     <%= file_field_tag :photo, class: 'upload' %>
    </p>
    <p>
      <%= label_tag :gender, class: 'gender' %>
      <%= radio_button_tag :gender, value: 'male', checked: true %>
      <%= radio_button_tag :remember_me, value: 'female' %>
    <p>
    <p>
      <%= label_tag :fav_color %>
      <%= select_tag :fav_color, options: [['green', '1'], ['orange', '2'], ['purple', '3']], selected: '2' %>
    </p>
    <p>
      <%= check_box_tag :remember_me, value: '1', checked: true %>
    <p>
    <p>
      <%= range_field_tag('ranger_with_min_max', min: 1, max: 50) %>
      <%= range_field_tag('ranger_with_range', range: 1..5) %>
    </p>
    <p>
      <%= datetime_field_tag :datetime, max: DateTime.new(2000, 4, 1, 12, 0, 0), min: DateTime.new(1993, 2, 24, 12, 30, 45), value: DateTime.new(2000, 4, 1, 12, 0, 0) %>
    </p>
    <p>
      <%= datetime_local_field_tag :datetime_local, max: DateTime.new(2000, 4, 1, 12, 0, 0), min: DateTime.new(1993, 2, 24, 12, 30, 45), value: DateTime.new(2000, 4, 1, 12, 0, 0) %>
    </p>
    <p>
      <%= date_field_tag :date, max: DateTime.new(2000, 4, 1), min: DateTime.new(1993, 2, 24), value: DateTime.new(2000, 4, 1) %>
    </p>
    <p>
      <%= month_field_tag :month, max: DateTime.new(2000, 4, 1), min: DateTime.new(1993, 2, 24), value: DateTime.new(2000, 4, 1) %>
    </p>
    <p>
      <%= week_field_tag :week, max: DateTime.new(2000, 4, 1), min: DateTime.new(1993, 2, 24), value: DateTime.new(2000, 4, 1) %>
    </p>
    <p>
      <%= time_field_tag :time, max: Time.new(2008, 6, 21, 13, 30, 0), min: Time.new(1993, 2, 24, 1, 19, 12), value: Time.new(2008, 6, 21, 13, 30, 0) %>
    </p>
    <p>
      <%= color_field_tag :color, value: '#f00' %>
    </p>
  <% end %>
  <% field_set_tag(class: 'buttons') do %>
    <%= submit_tag 'Login' %>
    <%= button_tag 'Cancel' %>
    <%= image_submit_tag 'buttons/submit.png' %>
  <% end %>
<% end %>

<% form_tag '/dontprotect', class: 'no-protection', protect_from_csrf: false do %>
<% end %>
