Forms

Discussion in 'HTML' started by shapper, Feb 15, 2009.

  1. shapper

    shapper Guest

    Hello,

    Can I have two forms in a page?

    And can I have one form inside another form?

    Thanks,
    Miguel
    shapper, Feb 15, 2009
    #1
    1. Advertising

  2. shapper wrote:

    > Can I have two forms in a page?


    Yes. Why not? Apart from common sense, which says that it's not usually a
    good idea.

    > And can I have one form inside another form?


    No. Even the HTML syntax forbids it.

    Now, what is your _real_ problem? What did you plan to achieve by having
    nested forms?

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Feb 15, 2009
    #2
    1. Advertising

  3. shapper

    shapper Guest

    On Feb 15, 9:09 pm, "Jukka K. Korpela" <> wrote:
    > shapper wrote:
    > > Can I have two forms in a page?

    >
    > Yes. Why not? Apart from common sense, which says that it's not usually a
    > good idea.
    >
    > > And can I have one form inside another form?

    >
    > No. Even the HTML syntax forbids it.
    >
    > Now, what is your _real_ problem? What did you plan to achieve by having
    > nested forms?
    >
    > --
    > Yucca,http://www.cs.tut.fi/~jkorpela/


    On a system to manage users, some users are professors.
    So I have a form to edit the CV of the professor but also a form to
    Add and Remove Themes that the professor lectures.

    I would like to have both forms on the same page ... in this case it
    makes sense
    So on form one I would have:
    - input CV
    - input Notes
    - input Save button

    And on second form I would have:
    - select Themes
    - checkboxes Levels
    - input Notes
    - input Add button
    And a list after it with the subscribed themes

    I think it makes sense to have this on the same page.

    The nested form was just curiosity ...
    shapper, Feb 15, 2009
    #3
  4. shapper

    richard Guest

    On Sun, 15 Feb 2009 12:25:22 -0800 (PST), shapper <>
    wrote:

    >Hello,
    >
    >Can I have two forms in a page?
    >
    >And can I have one form inside another form?
    >
    >Thanks,
    >Miguel



    http://www.w3schools.com/TAGS/tag_form.asp
    richard, Feb 16, 2009
    #4
  5. shapper

    rf Guest

    richard wrote:
    > On Sun, 15 Feb 2009 12:25:22 -0800 (PST), shapper <>
    > wrote:
    >
    >> Hello,
    >>
    >> Can I have two forms in a page?
    >>
    >> And can I have one form inside another form?
    >>
    >> Thanks,
    >> Miguel

    >
    >
    > http://www.w3schools.com/TAGS/tag_form.asp


    That page does not state if one can have more than one form on a page.

    More importantly neither does it say that a form may not be nested within
    another form. The specifications are much more concise:
    http://www.w3.org/TR/html401/interact/forms.html#edef-FORM
    Clearly a form can not contain another form, as per the -(FORM) bit at the
    top of the DTD extract.
    rf, Feb 16, 2009
    #5
  6. shapper wrote:

    >> --
    >> Yucca,http://www.cs.tut.fi/~jkorpela/


    If you quote signatures on regular basis, you might end up with getting
    ignored on a regular basis.

    > On a system to manage users, some users are professors.
    > So I have a form to edit the CV of the professor but also a form to
    > Add and Remove Themes that the professor lectures.


    These are both operations on data about an individual, so it might make
    sense to have both kinds of operations on the same page. But why not in the
    same form?

    > I would like to have both forms on the same page ... in this case it
    > makes sense
    > So on form one I would have:
    > - input CV
    > - input Notes
    > - input Save button
    >
    > And on second form I would have:
    > - select Themes
    > - checkboxes Levels
    > - input Notes
    > - input Add button
    > And a list after it with the subscribed themes
    >
    > I think it makes sense to have this on the same page.


    Quite possibly, but the normal way of doing such things is a single form,
    with an action like "Update", which updates whatever information has been
    entered. If you use two forms, then there is no reliable way of making them
    share some input fields.

    Using a single form implies that the server-side form data handler must be
    capable of dealing with any data (as it should anyway) and specifically
    process different fields, performing several updates in one transaction.

    > The nested form was just curiosity ...


    I see.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Feb 16, 2009
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brendan Miller

    Web Forms VS Windows Forms

    Brendan Miller, Aug 11, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    5,054
    Kevin Spencer
    Aug 11, 2003
  2. Eric
    Replies:
    2
    Views:
    1,380
    Tommy
    Feb 13, 2004
  3. jlopes151
    Replies:
    2
    Views:
    601
    Steve C. Orr [MVP, MCSD]
    Mar 14, 2005
  4. =?Utf-8?B?ZGF2aWQ=?=

    embedded windows forms into web forms for control

    =?Utf-8?B?ZGF2aWQ=?=, Apr 7, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    5,194
    =?Utf-8?B?ZGF2aWQ=?=
    Apr 10, 2005
  5. Eric
    Replies:
    2
    Views:
    458
Loading...

Share This Page