Forum Moderators: not2easy

Message Too Old, No Replies

dynamic forms?

can I generate selection options in a form?

         

halfandhalf

8:32 pm on Dec 3, 2003 (gmt 0)

10+ Year Member



I'm creating a form for people to sign up for an event. I'd like them to be able to have the option to add multiple people if they want.

For example...

who will attend?
name: [name]
email: [email]
address: [address]

[ ] check to add another
if checked, this will dynamically create another section as follows:

name: [name2]
email: [email2]
address: [address2]

Is there a way to do this using DHTML or CSS?

Reflection

10:15 pm on Dec 3, 2003 (gmt 0)

10+ Year Member



You would have to use some kind of scripting to dynamically create a new section and you can use css to control the appearence of the section, but if your question is can css do this on its own the answer is no.

That said if you know the max number of additional sections you will have, you can write them into the html and make them not display intially using css. You can then use some javascript to access the display or visibility property(depending on what you use) of the section and modify it so that the section will display.

DrDoc

10:26 pm on Dec 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there a way to do this using DHTML or CSS?

Just to clearify:
DHTML = HTML + JavaScript + CSS

So, yes, it can be done, just like Reflection explained :)