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| %>

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