Page 1 of 1

<form>insde <form>

Posted: Fri Oct 07, 2011 1:15 am
by Lphp
:( submit form , is that possible to handle

Code: Select all

<form id ="outside" action="post"method="outsideup">
<p> hello
<form id ="inside" action="post" method="inside up"></form>

</form>//outside form

Re: <form>insde <form>

Posted: Fri Oct 07, 2011 7:24 am
by social_experiment
You could create the syntax but i don't think it will work because which ever form is submitted will be submitted to it's respective action and leave the other form un-submitted. Which scenario would require such a set-up?

Re: <form>insde <form>

Posted: Fri Oct 07, 2011 10:02 am
by AbraCadaver
It is not possible, you can not have a form inside a form. Use two separate forms and/or explain what you are trying to accomplish.

Re: <form>insde <form>

Posted: Fri Oct 07, 2011 10:18 am
by social_experiment

Code: Select all

<form action="page.php" method="post" />
    <form action="page1.php" method="post" />
        <input type="submit" value="foo" name="bar" />
    </form>
    <input type="submit" value="foo2" name="bar2" />
</form>
AbraCadaver is correct, it won't work. The curious thing is that in an example like this, the inner submit button doesn't submit to the page of the inner form action (page1.php) but to the outer form action (page.php). It looks like the second form tags are completely ignored and the second submit button becomes useless.

Re: <form>insde <form>

Posted: Fri Oct 07, 2011 2:10 pm
by Zephni
@social_experiment that's interesting, Iv'e never tested that out, but then again.. I'm curious to why Lphp wanted to use a form inside a form?

Re: <form>insde <form>

Posted: Sat Oct 08, 2011 2:54 am
by social_experiment
Zephni wrote:I'm curious to why Lphp wanted to use a form inside a form?
Ditto. Offhand i cannot think of any situation that would require such a configuration. If a second form is required it would be more logical to have a second, seperate form.

Re: <form>insde <form>

Posted: Sun Oct 09, 2011 11:19 pm
by Lphp
one submit form , let a student information, then one field is phone , allow 3 phone , if I put the phone on other tables not the student , when you reach the update part , that is how to question pop up!

Re: <form>insde <form>

Posted: Mon Oct 10, 2011 12:51 am
by social_experiment
Lphp wrote: let a student information, then one field is phone , allow 3 phone ,
I still don't quite understand but forms can accept many input fields, the issue is maybe the logic with which you are designing the form :)