Hi friends
I am having one doubt.i am using form_for inside form_for and if i
clicked the child form_for submit button its going to parent form_for
snd the code is written bellow.
<%
form_for(:tender,:url=>{:action=>''create'',:id=>params[:id]})
do
|form| %>
<%
form_for(:tender,:url=>{:action=>''only_title'',:id=>params[:id]})
do
|form| %>
<input type="submit" name="submit"
value="create title" />
<%end%>
<input type="submit" name="submit"
value="next" />
<% end %>
Here if i clicked on ''create title'' button its going to
''create'' action
but it should go to ''only_title'' action,how to do it,please if
any one
knows please reply.
--
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
-~----------~----~----~----~------~----~------~--~---
babu nair wrote:> Here if i clicked on ''create title'' button its going to ''create'' action > but it should go to ''only_title'' action,how to do it,please if any one > knows please reply.I am not sure you can have a form within form??? -- 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 -~----------~----~----~----~------~----~------~--~---
On Nov 19, 7:47 pm, babu nair <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi friends > I am having one doubt.i am using form_for inside form_for and if i > clicked the child form_for submit button its going to parent form_for > snd the code is written bellow. >You can''t. The html standard does not allow nesting of forms (if you just want the form buildery bits and not an extra form tag then fields_for may be appropriate) Fred> <% form_for(:tender,:url=>{:action=>''create'',:id=>params[:id]}) do > |form| %> > > <% form_for(:tender,:url=>{:action=>''only_title'',:id=>params[:id]}) do > |form| %> > <input type="submit" name="submit" value="create title" /> > <%end%> > > <input type="submit" name="submit" value="next" /> > <% end %> > > Here if i clicked on ''create title'' button its going to ''create'' action > but it should go to ''only_title'' action,how to do it,please if any one > knows please reply. > -- > 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---