how to submit two form with one submit tag

how to submit two form with one submit tag

Hi Joe,

Could you be a little more specific and possibly post a code example or tell is in more detail what you’re trying to achieve?

Cheers,

James

hi james…

actually i am havng
this is my first form…

<%= form_tag :action => ‘create’ %>

Title: <%= text_field 'article', 'title' %>

Category: <%= collection_select(:article,:category_id,@categories,:id,:name) %>

Description
<%= text_area 'article', 'description' %>

-Tag : <%= text_field_tag 'tag_list' %> <%= submit_tag "Create" %> <%= form_tag %>

this is second form:

<% form_for :article_cover, :url => { :action => ‘create’, :id => @article.id }, :html => { :multipart => true } do |f| -%>

<%= f.file_field :uploaded_data %>

<%= submit_tag : create %>

<% end -%>

if i use both forms seperately …it works…but when i combinng them …the data s not savng…only null…is comng

hi,
do this
<% form_for :article_cover, :url => { :action => ‘create’, :id => @article.id }, :html => { :multipart => true } do |f| -%>

Title: <%= text_field 'article', 'title' %>

Category: <%= collection_select(:article,:category_id,@categories,:id,:name) %>

Description
<%= text_area 'article', 'description' %>

-Tag : <%= text_field_tag 'tag_list' %>

<%= f.file_field :uploaded_data %>

<%= submit_tag : create %>

<% end -%>