Profile Form (Vertical layout)
<%= bootstrap_form_for @user, bootstrap_form: {} do |form| %> <%= form.text_field :name, autocomplete: "new-name", class: "dsds", bootstrap_form: {} %> <%= form.text_field :email, autocomplete: "new-email", bootstrap_form: {} %> <%= form.text_field :password, autocomplete: "new-password" %> <%= form.phone_field :mobile_number %> <%= form.date_field :birth_date %> <%= form.check_box :terms, bootstrap_form: {switch: false}, required: true %> <%= form.range_field :excellence %> <%= form.url_field :blog_url %> <%= form.collection_radio_buttons :fruit_id, ::Fruit.all, :id, :name, {bootstrap_form: {}, checked: form.object.fruit_id} %> <%= form.color_field :favorite_color %> <%= form.collection_check_boxes :skill_ids, ::Skill.all, :id, :name, {bootstrap_form: {}} %> <%= form.fields_for :address, include_id: false do |address_form| %> <%= address_form.text_area :street %> <%= address_form.text_field :state %> <%= address_form.grouped_collection_select :city, ::Country.includes(:cities), :cities, :name, :id, :name, {include_blank: "Select city"} %> <%= address_form.text_field :postal_code %> <%= address_form.select :country_id, options_for_select(::Country.pluck(:name, :id), address_form.object.country_id), {include_blank: "Select Country", bootstrap_form: {}} %> <% end %>
<%= form.submit "Register", class: "btn btn-primary" %> <%= link_to "Cancel", users_path, class: "btn btn-secondary" %>
<% end %>