Hello,
I would like a user to fill out a form (a long contract) and then email
it to them, including the new values.
So I was leaning towards a partial or layout so I didn’t have to write
the contract twice. But that’s where I run into problems. The only
difference between the form (contract) and the email are the form tags
will be replaced with their actual values. For example:
My HTML Contract
<% form_for @contract, :url => { :action => “send_contract”} do |f| %>
<%= f.error_messages %>
My Email Contract
My goal:
<% if params[:action] == “contract” %>
<% form_for @contract, :url => { :action => “send_contract”} do |f| %>
<%= f.error_messages %>
<% end %>
Obviously, this doesn’t work. Any ideas on how to leverage the shared
text while still maintaining a form? I know I could use the form_tag
instead, but that wouldn’t give me all the needed stuff that comes
with the form_for tag.
Adam