[thelist] Pros and cons: Showing and hiding form sections

Bird, Graham Graham.Bird at rspb.org.uk
Wed Jul 2 09:53:06 CDT 2003


Hi,

What are the pros and cons of building a form with show/hide behaviours for
"optional" (not everybody needs them) sections?

I am envisaging a form where the underlying HTML is "complete" but certain
sections are hidden using the CSS "display:none" property. If necessary,
users would click links to "add" (reveal) elements to the form if they need
them. These links would use onClick behaviours and javascript.

This would mean that the entire form would be submitted to the server, but
unnecessary fields would not have been filled in (or even seen).

This seems like a good idea in theory. I have a few worries:

1. Users with version 3 or 4 browsers will see all fields (this is
intentional) AND the "Show" links
2. The "Show" links would either have "#" or "#section1" as the href value.
This is not ideal since the page jumps about - is there another way?
3. I am missing some major flaw that is really really obvious.

Any thoughts would be most welcome?

(By the way, I am aware of ppk's DOM waiting room method, but I would like
to support older browsers. However, I am open to all options.)

Cheers,

Graham


More information about the thelist mailing list