FORM tag in tables

Discussion in 'HTML' started by Christian Hauser, Jul 30, 2003.

  1. Hello all

    I'm wondering if there is a recommended position of the form-tag within
    tables.

    In the following (very simplified) example the form-tag is between <tr>
    and <td>, however, I don't know whether this is a good style or not. If
    not, where should I place the <form> and </form> tags?

    Thank you for any hint,
    Christian


    <tr>
    <form name="..." method="...">
    <td>
    <table>
    <tr>
    <td>
    ...
    </td>
    <td>
    ...
    </td>
    <td>
    <select name="...">
    <option value=".">...
    </select>
    </td>
    <td>
    ...
    </td>
    </tr>
    <tr>
    ...
    <td>
    <textarea name="..." cols="45" rows="6"></textarea>
    </td>
    ...
    </tr>
    <tr>
    ...
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td>
    ...
    </td>
    </tr>
    <tr>
    <td>
    <input type="submit" value="...">
    </td>
    </form>
    </tr>
     
    Christian Hauser, Jul 30, 2003
    #1
    1. Advertising

  2. Christian Hauser wrote:

    > I'm wondering if there is a recommended position of the form-tag within
    > tables.


    There are two ways to mix tables and forms.

    * The entire <form> element inside a table data cell
    - in which case you have very off tabular data and should read
    http://www.allmyfaqs.com/faq.pl?Tableless_layouts

    * The entire <table> inside the <form>
    - in which case you are considering form data to be tabular data which the
    user is entering some of.
    - These pages might be useful though:
    ~ http://www.webweaver.org/dan/css/cssforms.html
    ~ http://pixy.cz/blogg/clanky/css-fieldsetandlabels.html
    ~ http://www.realworldstyle.com/forms.html

    > In the following (very simplified) example the form-tag is between <tr>
    > and <td>, however, I don't know whether this is a good style or not.


    Not only is it bad style, it is not allowed (at least in an HTML document).

    --
    David Dorward http://david.us-lot.org/
    Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming
    it'll stop pop-up ads? -- Dork Tower
     
    David Dorward, Jul 30, 2003
    #2
    1. Advertising

  3. Christian Hauser wrote:

    > I'm wondering if there is a recommended position of the form-tag within
    > tables.


    There are two ways to mix tables and forms.

    * The entire <form> element inside a table data cell
    - in which case you have very odd tabular data and should read
    http://www.allmyfaqs.com/faq.pl?Tableless_layouts

    * The entire <table> inside the <form>
    - in which case you are considering form data to be tabular data which the
    user is entering some of.
    - These pages might be useful though:
    ~ http://www.webweaver.org/dan/css/cssforms.html
    ~ http://pixy.cz/blogg/clanky/css-fieldsetandlabels.html
    ~ http://www.realworldstyle.com/forms.html

    > In the following (very simplified) example the form-tag is between <tr>
    > and <td>, however, I don't know whether this is a good style or not.


    Not only is it bad style, it is not allowed (at least in an HTML document).

    http://validator.w3.org/ is your friend.

    --
    David Dorward http://david.us-lot.org/
    Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming
    it'll stop pop-up ads? -- Dork Tower
     
    David Dorward, Jul 30, 2003
    #3
  4. David Dorward wrote:

    > Christian Hauser wrote:
    >
    >
    >>I'm wondering if there is a recommended position of the form-tag within
    >>tables.

    >
    >
    > There are two ways to mix tables and forms.
    >
    > * The entire <form> element inside a table data cell
    > - in which case you have very odd tabular data and should read
    > http://www.allmyfaqs.com/faq.pl?Tableless_layouts
    >
    > * The entire <table> inside the <form>
    > - in which case you are considering form data to be tabular data which the
    > user is entering some of.
    > - These pages might be useful though:
    > ~ http://www.webweaver.org/dan/css/cssforms.html
    > ~ http://pixy.cz/blogg/clanky/css-fieldsetandlabels.html
    > ~ http://www.realworldstyle.com/forms.html
    >
    >
    >>In the following (very simplified) example the form-tag is between <tr>
    >>and <td>, however, I don't know whether this is a good style or not.

    >
    >
    > Not only is it bad style, it is not allowed (at least in an HTML document).
    >
    > http://validator.w3.org/ is your friend.
    >



    Thank you.
    I will put the whole table in the form tag.
     
    Christian Hauser, Jul 31, 2003
    #4
    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. RC
    Replies:
    2
    Views:
    455
    Malte
    May 10, 2005
  2. shruds
    Replies:
    1
    Views:
    932
    John C. Bollinger
    Jan 27, 2006
  3. RC
    Replies:
    2
    Views:
    688
  4. Replies:
    2
    Views:
    552
    Bergamot
    Jul 25, 2007
  5. André
    Replies:
    2
    Views:
    794
    André
    Jun 23, 2008
Loading...

Share This Page