Currently i am creating a form that changes its content dynamically on switching a select box. To keep my code clean I am creating 3 different partials. As I want to be DRY, I keep the form statement in the main ERB file. To get this to work you just need to pass in the local variable f of the form.

<%= form_for(@model) do |f| %>

<%= f.text_field :name %> Please enter a descriptive name
<%= render :partial => 'form', :locals => {:f => f} %>
<%= f.submit 'continue' %>
<% end %>