Can forums have multiple divs in them?

Discussion in 'HTML & Website Design' started by Matt Ridge, Sep 15, 2011.

  1. #1
    I have one form with 30 fields, I want to spread it across one page. The way I see myself doing it is "Dving" up sections to put it across multiple areas in the page.

    Is this possible and still be able to enter the data into a database?

    In theory I think it is, but I'm new to this concept.

    View attachment difdivs.zip
     
    Last edited: Sep 15, 2011
    Matt Ridge, Sep 15, 2011 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    It is, but remember, divs are block elements. It's going to be a little easier if you use spans instead of divs.

    <span id="mySpan"><input type="text" id="myText" /></span>
     
    Rukbat, Sep 15, 2011 IP
  3. workingsmart

    workingsmart Well-Known Member

    Messages:
    411
    Likes Received:
    12
    Best Answers:
    9
    Trophy Points:
    120
    #3
    Matt, layout markup is a completely separate issue from inserting/updating data in your database... The xhtml markup is merely for displaying not for inserting/updating, etc... Therefore is a completely unrelated question... :)

    P.S. - Your title threw me for a second... reads ==> Forum instead of FORM... lol
     
    workingsmart, Sep 15, 2011 IP
  4. PSDCODED

    PSDCODED Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The answer is yes - but remember, you can style any of the elements of the form any way you want.

    So it may not be necessary to use divs. Consider what the most appropriate element is given the nature of the content.
     
    PSDCODED, Sep 15, 2011 IP
  5. Matt Ridge

    Matt Ridge Peon

    Messages:
    166
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Ok, what I'm trying to do is not simple, at least to me... so bare with my noobness.

    I have 12 fields, four fields need to be to the left of the page. Four need to be the right of the page, horizontal to the four on the left.

    Now here comes the hard part for me.

    Three need to be horizontally side by side, with the text above the fields.

    The last one can be placed under the three horizontal.

    When I get done I need to be able to press one button and all the data goes to a database.

    The only way I've been able to do it so far is the attachment here... but realistically I know there has to be a better way.

    BTW I have not yet moved the three fields... I was going to do that via CSS scripting, but I was hoping to find an answer before I spent more time on it.

    And yes there is no button yet, because I wanted to know my answer before I went in deep into this form.

    View attachment test folder.zip
     
    Matt Ridge, Sep 16, 2011 IP
  6. workingsmart

    workingsmart Well-Known Member

    Messages:
    411
    Likes Received:
    12
    Best Answers:
    9
    Trophy Points:
    120
    #6
    You're going to need to create a form processor to that can handle the data collected by the form using php/asp, etc...

    Your layout, even with your noobiness is rather easy to achieve... You could/should consider using lists for your markup along with <label>'s for your form field text and use your stylesheet to control the style and some behaviors, if needed.

    But to manipulate the data, you're going to have to create a form processor...
     
    workingsmart, Sep 16, 2011 IP
  7. Matt Ridge

    Matt Ridge Peon

    Messages:
    166
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #7
    Could I do it with PHP/SQL?
     
    Matt Ridge, Sep 16, 2011 IP
  8. workingsmart

    workingsmart Well-Known Member

    Messages:
    411
    Likes Received:
    12
    Best Answers:
    9
    Trophy Points:
    120
    #8
    for languages I meant php/asp, etc... ( or others ) - as for a database, sure, use MySql... :)
     
    workingsmart, Sep 16, 2011 IP