SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast efarmboy's Avatar
    Join Date
    Sep 2002
    Location
    Mississauga
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Complex Form approach with hidden areas

    I have a need to build a complex form that may have > 50 questions. There are questions that should only appear if a certain previous choice has been selected.

    I have a few questions on approach.

    1) If I made this into several pages, how can I post all the results if I've had to use several forms

    2) Is it best to break this into several forms but it still needs to look to the user as one operation

    3) What is the best way to enable the hidden areas.
    • I tried to use the hidden div tags such as: <div id="div1" style="visibility:hidden;"> but had trouble using this in the table. The space occupied byt the table row I wanted to hide was still there - I was not able to reduce this space.
    • I then tried using separate tables as in <table display:visible;"> and this worked better.
    4) I will need to enable and disable these areas using Javascript. Can you see any issues with doing this using the table option

    5) Is there a better way to use the <div> tags and not occupy any space when hidden but still allow me to control the overall layout in a table and form.

    Thanks in advance for any ideas on how to approach this.

  2. #2
    SitePoint Evangelist ucahg's Avatar
    Join Date
    Apr 2001
    Location
    Sarnia, Ontario, Canada
    Posts
    434
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This may not answer your question, but if you do use hidden divs which are shown or hidden based on previous values, then make sure you also state this with text, for browsers that do not support or have disabled CSS and JavaScript, it will still make sense.

    For example:

    Do you want a sunroof?
    o Yes o No
    [hidden part; shown if answer is yes]
    If you answered yes, question goes here

    This way, the average joe only sees it as a bit of redunancy, but probably wouldn't even notice, however the lynx user will avoid the confusion of form fields that he doesn't need to answer and may or may not be applicable.
    Love it? Hate it? Helpful? Useless?
    Use the rate button to let me know what you think of my post!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •