/    Sign up×
Community /Pin to ProfileBookmark

Nesting forms

I am wanting to have a seperate form in the middle of another form, i cant think of any other way to do it as I’m using tables. Below is a diagram of what i mean:

[code]|————-|————-|
| | |
| | |
| FORM 1 | FORM 2 |
| | |
| | |
|————-|————-|
| |
| FORM 1 CONTINUED |
| … |
| … |
| … |
| … |
| |
|—————————|[/code]

would the following work? (where the first submit button submits form 2)

<form name=form1 …>



<form name=form2 …>



<input type=submit>
</form>



<input type=submit>
</form>

Thanks in advance for any help!

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@hammerslaneJan 15.2004 — hi, sorry i don't have the answer, but i'm just interested as to why you need two forms on 1 page?

not saying you shouldn't, i'm just interested as to what you're doing really.
Copy linkTweet thisAlerts:
@nutheadauthorJan 15.2004 — I'm writing a webmail script and I want it so the left hand side is for to/cc/Subject etc. and on the right it will list and deal with attachments (by means of a pop-up box that will be opened when form 2 is submitted), the main box below is for the body...

I think I'm going to have to think of a better way to do this but I can't be arsed! (plus i'm curious if the above would work)
Copy linkTweet thisAlerts:
@soccer362001Jan 15.2004 — If I am recalling correctly it is impossible to nest forms.
Copy linkTweet thisAlerts:
@FangJan 15.2004 — Nesting of forms is possible, but not advisable. In [URL=http://www.w3.org/TR/xhtml1/#prohibitions]XHTML1[/URL] it is prohibited.
Copy linkTweet thisAlerts:
@nutheadauthorJan 15.2004 — Cheers anyway, iv'e changed my mind now ?
×

Success!

Help @nuthead spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 1.24,
social: @webDeveloperHQ,
});

legal: ({
terms: of use,
privacy: policy
analytics: Fullres
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: Anonymous,
tipped: article
amount: 1000 SATS,

tipper: @dert,
tipped: article
amount: 1000 SATS,

tipper: @viney352,
tipped: article
amount: 10 SATS,
)...