Hi I have a main form like below <%= start_form_tag ({:action => ''update_sd_ticket'', :method => ''post'',:id =>@sd_ticket.id})%> <table> <tr> <th width=""><label for="" >SD Ticket</label></th> <td colspan="" width=""><%=h @sd_ticket.number %></td> </tr> </table> <ul id="sdmaintab" class="shadetabs"> <li><a href="#" rel="view_sd_resolution_details">Resolution</a></li> </ul> <div id="sddetails" class="tabcontent"> <%= render :partial=>''service_desk_part/edit_sd_details'' %> </div> <div id="view_sd_resolution_details" class="tabcontent"> <%= render :partial => ''service_desk_part/view_sd_resolution_details'' %> </div> <%= end_form_tag %> AND INSIDE THE PARTIAL FILE view_sd_resolution_details (which is completely inside a div)a link_to_remote is there which replaces this div and the file define_sd_resolution_ui is called ..(This is working) and in that the following form is there. <%= form_remote_tag :url => { :action => ''sd_resolution_save'', :id => @sd_ticket.id, :sd_resolution_id=>@sd_resolution_id, :page => params[:page]}, :class => ''itilform''%> <tr> <th width="25%"><label for="" >Resolution</label></th> <td width="75%"><%= text_area("sd_resolution", "resolution", "cols" => 80, "rows" => 5) %></td> </tr> <%= end_form_tag> BUT THIS FORM ACTION DOES NOT WORK..HOW CAN I OVERCOME THIS? Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
taken from w3c (http://www.w3.org/TR/REC-html32): "FORM fill-out forms Requires start and end tags. This element is used to define a fill-out form for processing by HTTP servers. The attributes are ACTION, METHOD and ENCTYPE. Form elements can''t be nested." --> you can''t put a <form> tag inside a <form> ancestor tag , and that is pretty much what you are doing. you have to seperate the two. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sijo: This is the very same issue that you posted earlier: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/86adead2460b6ffe/cf2b5a0a344c07a5?lnk=gst&q=Sijo+form+partial#cf2b5a0a344c07a5 I don''t want to discourage you from using Rails, but please do slow down a bit and study what you are working with. You are posting a lot of questions and many of the answers share the same or similar root causes. On Mar 17, 5:19 am, Sijo Kg <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi > > I have a main form like below > > <%= start_form_tag ({:action => ''update_sd_ticket'', :method => > ''post'',:id =>@sd_ticket.id})%> > <table> > <tr> > <th width=""><label for="" >SD Ticket</label></th> > <td colspan="" width=""><%=h @sd_ticket.number %></td> > </tr> > </table> > <ul id="sdmaintab" class="shadetabs"> > <li><a href="#" rel="view_sd_resolution_details">Resolution</a></li> > </ul> > > <div id="sddetails" class="tabcontent"> > <%= render :partial=>''service_desk_part/edit_sd_details'' %> > </div> > <div id="view_sd_resolution_details" class="tabcontent"> > <%= render :partial => ''service_desk_part/view_sd_resolution_details'' %> > </div> > > <%= end_form_tag %> > > AND INSIDE THE PARTIAL FILE view_sd_resolution_details (which is > completely inside a div)a link_to_remote is there which replaces this > div and the file define_sd_resolution_ui is called ..(This is working) > and in that the following form is there. > > <%= form_remote_tag :url => { :action => ''sd_resolution_save'', > :id => @sd_ticket.id, > :sd_resolution_id=>@sd_resolution_id, :page => params[:page]}, > :class => ''itilform''%> > > <tr> > <th width="25%"><label for="" >Resolution</label></th> > <td width="75%"><%= text_area("sd_resolution", "resolution", "cols" > => 80, "rows" => 5) %></td> > </tr> > <%= end_form_tag> > > BUT THIS FORM ACTION DOES NOT WORK..HOW CAN I OVERCOME THIS? > > Sijo > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Handle the issue of subforms you need to read up on the API regarding the fields_for method. See ActionView::Helpers::FormHelper. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Sijo, Watch the following Railscasts that might give you ideas on how to solve your problem: Episode 16: Virtual Attributes Complex Forms Part 1 Complex Forms Part 2 Complex Forms Part 3 Another trick is to have multiple forms but with submit buttons targeting a specific form. i.e. <form action="/action" id="action_edit" method="post" name="action_edit"> <fieldset> <legend><span>Details</span></legend> <ol> <li> <label for="action_title">title :</label> <input id="action_title" name="action[title]" type="text" value="" /> </li> </ol> </fieldset> </form> <form action="/another_action" method="post" name="another_action_edit"> <li> <label for="another_action_title">title :</label> <input id="another_action_title" name="another_action[another_action_title]" type="text" /> </li> <li> <div id="another_action_button"> <div class="buttons"> <button type="submit">Upload</button> </div> </div> </li> </form> <!-- NOTE: Below we have a submit button that will submit the top form, while the form in the middle has it''s own submit button. As far as the user is concerned, he is none the wiser that it is actually two forms --> <div class="buttons"> <button type="submit" onclick="document.forms[''action_edit''].submit();"> </div> Hope this was of help... Cheers, Maruis Marais On 18/03/2008, at 2:39 AM, James Byrne wrote:> > Handle the issue of subforms you need to read up on the API regarding > the fields_for method. See ActionView::Helpers::FormHelper. > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Thanks for your help Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---