%%# Renders a partial which is used to create a new <%= instance_name %> %>
<%%= form_for(<%= form_for_object %>, :html => {:id=>"form_<%= instance_name %>", :class=>"margin-bottom-0 form-horizontal", :role => "form", :method => (@<%= instance_name %>.new_record? ? :post : :put), :remote=>true}) do |f| %>
<%%= @<%= instance_name %>.errors[:base].to_sentence %>
<%%= hidden_field_tag :faction, @<%= instance_name %>.new_record? ? <%= resource_link('index', 'path') %> : <%= resource_link('index', 'path') %>(@<%= instance_name %>) %>
<%%= hidden_field_tag :fmethod, @<%= instance_name %>.new_record? ? "POST" : "PUT" %>
<%- fields.each do |name, type| %>
<%%= render :partial=>"field", :locals=>{:object=>@<%= instance_name %>,
:object_name=>'<%= instance_name %>',
:field_name=>'<%= name %>',
:display_name=>'<%= name.titleize %>',
:field_type=>'<%= type %>',
:input_type=>'<%= guess_input_type(name, type) %>',
:required=>true,
:place_holder=>"e.g: Put a suitable example here."} %>
<%- end -%>